Skip to content

Commit

Permalink
refactor: update example build & run info (#427)
Browse files Browse the repository at this point in the history
* doc: update build & run info in README.md
* update build & run info in log output
* update test snapshot
  • Loading branch information
brodycj authored Mar 16, 2021
1 parent eeb14e7 commit 0d32c48
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
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

0 comments on commit 0d32c48

Please sign in to comment.