forked from react-native-community/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: add support for
add-platform
command
- Loading branch information
1 parent
b5d4778
commit 0438e2d
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import chalk from 'chalk'; | ||
import {logger} from '@react-native-community/cli-tools'; | ||
import path from 'path'; | ||
|
||
function printInitScript( | ||
projectName: string, | ||
) { | ||
const relativeXcodeProjectPath = `visionos/${projectName}.xcworkspace`; | ||
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 | ||
${chalk.dim('- or -')} | ||
• Open ${relativeXcodeProjectPath} in Xcode or run "xed -b ${relativeXcodeProjectPath}" | ||
• Hit the Run button | ||
`; | ||
|
||
logger.log(` | ||
${instructions} | ||
`); | ||
} | ||
|
||
export default printInitScript; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters