From d3515c7d35cd0c9356e01abd06fbb0e068d68a64 Mon Sep 17 00:00:00 2001 From: Chris Brody Date: Wed, 24 Feb 2021 00:55:22 -0500 Subject: [PATCH 1/6] doc: update build & run info --- README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e80055f6..93552306 100644 --- a/README.md +++ b/README.md @@ -183,9 +183,11 @@ 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 +yarn android ``` -react-native run-android -``` + +or 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: @@ -203,9 +205,11 @@ cd ios && pod install && cd .. Then to run on iOS: +```console +yarn ios ``` -react-native run-ios -``` + +or for React Native `0.60`: `npx react-native run-ios` or do the following command to open the iOS project in Xcode: @@ -250,12 +254,12 @@ It is *recommended* to start the Metro Bundler manually as described above (with yarn start ``` -To run on Android: do `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 `react-native run-ios` or `open ios/example.xcodeproj` +- do `yarn ios`, `npx react-native run-ios`, or `open ios/example.xcodeproj` __Expected result:__ From d73805b973aeaf8eae6de864b6de8f816f4b9121 Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Thu, 11 Mar 2021 14:17:01 -0500 Subject: [PATCH 2/6] FIX-UP: remove obsolete lines after merging from master --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 2ef8bed9..ecf216dd 100644 --- a/README.md +++ b/README.md @@ -192,8 +192,6 @@ yarn android or for React Native `0.60`: `npx react-native run-android` -~~(or `yarn android` on React Native starting with 0.61)~~ - 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: ``` @@ -216,8 +214,6 @@ yarn ios or for React Native `0.60`: `npx react-native run-ios` -~~(or `yarn ios` on React Native starting with 0.61)~~ - or do the following command to open the iOS project in Xcode: ``` From 8b9c7236c19330e62d6d69788d2867e32f6ab23d Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Mon, 15 Mar 2021 19:52:23 -0400 Subject: [PATCH 3/6] update build & run info in log output --- lib/cli-command.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cli-command.js b/lib/cli-command.js index 34a7223e..403e2fb9 100644 --- a/lib/cli-command.js +++ b/lib/cli-command.js @@ -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 From 0c51fc13ac5b20436af7436b4a2b5b955568edf3 Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Mon, 15 Mar 2021 19:53:17 -0400 Subject: [PATCH 4/6] update test snapshot --- .../cli-program-with-example-with-logging.test.js.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap b/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap index e895dca4..c45a069e 100644 --- a/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap +++ b/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap @@ -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 From 5a6dd7874bda635c030cc0520938d80ee6717d0f Mon Sep 17 00:00:00 2001 From: Chris Brody Date: Mon, 15 Mar 2021 20:04:10 -0400 Subject: [PATCH 5/6] use console highlighting --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ecf216dd..fe204a40 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,7 @@ createLibraryModule({ __Create the module with no view:__ -``` +```console create-react-native-module --prefix CB --package-identifier io.mylibrary --generate-example AliceHelper ``` @@ -164,7 +164,7 @@ The module would be generated in the `react-native-alice-helper` subdirectory, a Then go into the example app subdirectory: -``` +```console cd react-native-alice-helper/example ``` @@ -178,7 +178,7 @@ _Within the example test app subdirectory:_ It is *recommended* to start the Metro Bundler manually (within `react-native-alice-helper/example`), which would run in the foreground: -``` +```console yarn start ``` @@ -194,7 +194,7 @@ or 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: -``` +```console ANDROID_HOME=~/Library/Android/sdk npx react-native run-android ``` @@ -202,7 +202,7 @@ For iOS: Extra installation step needed _in case of clean checkout only_: -``` +```console cd ios && pod install && cd .. ``` @@ -216,7 +216,7 @@ or for React Native `0.60`: `npx react-native run-ios` or do the following command to open the iOS project in Xcode: -``` +```console open ios/example.xcodeproj ``` @@ -231,7 +231,7 @@ The example app shows the following indications: __Create the module with an extremely simple view:__ -``` +```console create-react-native-module --prefix CB --package-identifier io.mylibrary --view --generate-example CarolWidget ``` @@ -239,7 +239,7 @@ The module would be generated in the `react-native-carol-widget` subdirectory, a Then go into the example app subdirectory: -``` +```console cd react-native-carol-widget/example ``` @@ -253,7 +253,7 @@ _Within the example test app subdirectory:_ It is *recommended* to start the Metro Bundler manually as described above (within `react-native-carol-widget/example`): -``` +```console yarn start ``` From 98536899f9db9e47965ec77043a5b4a127d9ed66 Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Mon, 15 Mar 2021 22:38:11 -0400 Subject: [PATCH 6/6] minor edit --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d87edff6..a0bc5179 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,7 @@ To run on Android, do the following command (within `react-native-alice-helper/e yarn android ``` -or for React Native `0.60`: `npx react-native run-android` +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: @@ -214,7 +214,7 @@ Then to run on iOS: yarn ios ``` -or for React Native `0.60`: `npx react-native run-ios` +for React Native `0.60`: `npx react-native run-ios` or do the following command to open the iOS project in Xcode: