Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: update example build & run info #427

Merged
merged 10 commits into from
Mar 16, 2021
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ Otherwise, React Native will open its own window to run the Metro Bundler.
To run on Android, do the following command (within `react-native-alice-helper/example`):

```console
npx react-native run-android
yarn android
```

(or `yarn android` on React Native starting with 0.61)
for React Native `0.60`: `npx react-native run-android`

This assumes that the `ANDROID_HOME` environmental variable is set properly. Here is a sample command that does not make such an assumption on a mac:

Expand All @@ -211,10 +211,10 @@ cd ios && pod install && cd ..
Then to run on iOS:

```console
npx react-native run-ios
yarn ios
```

(or `yarn ios` on React Native starting with 0.61)
for React Native `0.60`: `npx react-native run-ios`

or do the following command to open the iOS project in Xcode:

Expand Down Expand Up @@ -259,12 +259,12 @@ It is *recommended* to start the Metro Bundler manually as described above (with
yarn start
```

To run on Android: do `npx react-native run-android` as described for the other example above.
To run on Android: do `yarn android` or `npx react-native run-android` as described for the other example above.

To run on iOS (as described above):

- _in case of clean checkout **only**_: do `pod install` in `ios` subdirectory
- do `npx react-native run-ios` or `open ios/example.xcodeproj`
- do `yarn ios`, `npx react-native run-ios`, or `open ios/example.xcodeproj`

__Expected result:__

Expand Down
2 changes: 1 addition & 1 deletion lib/cli-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ${logSymbols.info} (cd ${moduleName}/${exampleName} && yarn start)
${emoji.get('bulb')} enter the following commands to run the example app:
${logSymbols.info} cd ${moduleName}/${exampleName}
${platforms.split(',').map(platform =>
`${logSymbols.info} react-native run-${platform}`
`${logSymbols.info} yarn ${platform} # for React Native 0.60: npx react-native run-${platform}`
).join(`
`)}
${logSymbols.warning} IMPORTANT NOTICES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1204,8 +1204,8 @@ YOU'RE ALL SET!
ℹ (cd react-native-test-package/undefined && yarn start)
💡 enter the following commands to run the example app:
ℹ cd react-native-test-package/undefined
ℹ react-native run-android
ℹ react-native run-ios
yarn android # for React Native 0.60: npx react-native run-android
yarn ios # for React Native 0.60: npx react-native run-ios
⚠ IMPORTANT NOTICES
⚠ After clean checkout, these first steps are needed:
ℹ run Yarn in react-native-test-package/undefined/ios
Expand Down