Skip to content

Commit

Permalink
feat!: add support for add-platform command
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonrybczak committed Aug 28, 2024
1 parent b5d4778 commit 72fd8d7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
26 changes: 26 additions & 0 deletions postInitScript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env node

const chalk = require("chalk");
const path = require("path");

function printInitScript(projectName) {
const projectDir = path.resolve();

const instructions = `
${chalk.cyan(`Run instructions for ${chalk.bold("visionOS")}`)}:
• cd "${projectDir}/visionos"
• Install Cocoapods
• bundle install # you need to run this only once in your project.
• bundle exec pod install
• cd ..
• npx react-native run-visionos
`;

console.log(`
${instructions}
`);
}

printInitScript();
2 changes: 2 additions & 0 deletions template.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ module.exports = {
placeholderName: 'HelloWorld',
titlePlaceholder: 'Hello App Display Name',
templateDir: './template',
platforms: ['visionos'],
postInitScript: './postInitScript.js',
};

0 comments on commit 72fd8d7

Please sign in to comment.