Skip to content

Commit

Permalink
feat!: add support for add-platform command
Browse files Browse the repository at this point in the history
fix: include `postInitScript.js` in package files

fix: remove `chalk` dependency
  • Loading branch information
szymonrybczak authored and okwasniewski committed Nov 27, 2024
1 parent 40c5033 commit 41ad6e8
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"type": "commonjs",
"files": [
"template/*",
"template.config.js"
"template.config.js",
"postInitScript.js"
],
"dependencies": {},
"devDependencies": {
Expand Down
28 changes: 28 additions & 0 deletions postInitScript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env node

const path = require("path");

// ANSI escape codes for colors and formatting
const reset = "\x1b[0m";
const cyan = "\x1b[36m";
const bold = "\x1b[1m";

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

const instructions = `
${cyan}Run instructions for ${bold}visionOS${reset}${cyan}:${reset}
• 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 41ad6e8

Please sign in to comment.