From 3609ad66132d2fe2f5b4d8970e7963564fa7a353 Mon Sep 17 00:00:00 2001 From: Diego Rey Mendez Date: Fri, 20 Apr 2018 17:09:26 -0300 Subject: [PATCH 1/4] Improves package.lock files. --- example/package.json | 11 +++++------ package.json | 9 ++++++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/example/package.json b/example/package.json index 4b6a33203a28c..f99f78beb29e3 100644 --- a/example/package.json +++ b/example/package.json @@ -8,12 +8,11 @@ "android": "react-native run-android", "ios": "react-native run-ios", "test": "jest", - "clean": "watchman watch-del-all; rm -rf node_modules/ yarn.lock package-lock.json; yarn clean-react; yarn clean-metro; yarn clean-jest; yarn clean-ios;", - "clean-ios": "type xcodebuild &> /dev/null && (xcodebuild -project ./iOS/example.xcodeproj -alltargets clean && rm -rf ./iOS/build);", - "clean-jest": "rm -rf $TMPDIR/jest_*", - "clean-metro": "rm -rf $TMPDIR/metro-cache-*; rm -rf $TMPDIR/metro-bundler-cache-*;", - "clean-react": "rm -rf $TMPDIR/react-*; rm -rf $TMPDIR/react-native-packager-cache-*", - "clean:install": "yarn clean; yarn;" + "clean": "yarn clean-aztec; yarn clean-node; yarn clean-ios;", + "clean-aztec": "pushd ../ && (yarn clean; popd;)", + "clean-ios": "type xcodebuild &> /dev/null && (xcodebuild -project ./ios/example.xcodeproj -alltargets clean && rm -rf ./ios/build);", + "clean-node": "rm -rf node_modules/;", + "clean:install": "yarn clean && yarn install" }, "dependencies": { "react": "16.3.1", diff --git a/package.json b/package.json index 71a91efd5948f..5b7a0ccfaedbc 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,12 @@ "version": "0.0.1", "license": "GPL-2.0", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "clean": "watchman watch-del-all; rm -rf node_modules/ yarn.lock package-lock.json; rm -rf $TMPDIR/react-*; rm -rf $TMPDIR/metro-cache-*; rm -rf $TMPDIR/jest_*", - "clean:install": "yarn clean; yarn; pushd example; yarn; popd" + "clean": "yarn clean-watchman; yarn clean-node; yarn clean-react; yarn clean-metro; yarn clean-jest;", + "clean-jest": "rm -rf $TMPDIR/jest_*;", + "clean-metro": "rm -rf $TMPDIR/metro-cache-*; rm -rf $TMPDIR/metro-bundler-cache-*;", + "clean-node": "rm -rf node_modules/;", + "clean-react": "rm -rf $TMPDIR/react-*; rm -rf $TMPDIR/react-native-packager-cache-*;", + "clean-watchman": "watchman watch-del-all;" }, "peerDependencies": { "react": "16.3.1", From 0d6886fc2ae79c5c4fe22ed8b501d39901aa878f Mon Sep 17 00:00:00 2001 From: Diego Rey Mendez Date: Fri, 20 Apr 2018 17:10:52 -0300 Subject: [PATCH 2/4] Updates README.md. --- README.md | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/README.md b/README.md index 61100a8a8a835..9fed905ce5704 100644 --- a/README.md +++ b/README.md @@ -50,11 +50,6 @@ If you have to change Android native code, you must have a look at the code in ` ## Android: Run the example app -At the root folder, run: -``` -$ yarn clean:install -``` - Make sure to have an emulator running or an Android device connected, and then: ``` @@ -67,18 +62,9 @@ This will build the Android library (via `gradle`) and example app, then launch ## iOS: Run the example app -At the root folder, clean the library: -``` -$ yarn clean:install -``` - -Then move to the example folder: +Simply do: ``` $ cd example/ -``` - -Clean the example app and run it: -``` $ yarn clean:install $ yarn ios ``` @@ -102,8 +88,6 @@ Q: The example app gets compiled but ReactNative shows an error A: try running, from the root folder in the project ``` -yarn clean -yarn cd example/ yarn start --reset-cache ``` From b3a31bc631523344aa9b29f1970535c838ab5998 Mon Sep 17 00:00:00 2001 From: Diego Rey Mendez Date: Fri, 20 Apr 2018 17:40:38 -0300 Subject: [PATCH 3/4] Final touches to README.md. --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9fed905ce5704..6881b45e253fa 100644 --- a/README.md +++ b/README.md @@ -88,20 +88,19 @@ Q: The example app gets compiled but ReactNative shows an error A: try running, from the root folder in the project ``` -cd example/ -yarn start --reset-cache +$ cd example/ +$ yarn start --reset-cache ``` Open a new shell window and run either of these depending on the platform: ``` -yarn android - +$ yarn android ``` or ``` -yarn ios +$ yarn ios ``` From 613fe9dd7fd6e9cee4a39a841971c068a105ea45 Mon Sep 17 00:00:00 2001 From: Diego Rey Mendez Date: Fri, 20 Apr 2018 20:46:10 -0300 Subject: [PATCH 4/4] The install command now forces the library to install too. --- example/package.json | 3 ++- package.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/example/package.json b/example/package.json index f99f78beb29e3..c9a79df21aaea 100644 --- a/example/package.json +++ b/example/package.json @@ -4,6 +4,7 @@ "description": "Example for running ponies", "main": "index.js", "scripts": { + "install-aztec": "pushd ../ && (yarn install; popd;)", "start": "node node_modules/react-native/local-cli/cli.js start", "android": "react-native run-android", "ios": "react-native run-ios", @@ -12,7 +13,7 @@ "clean-aztec": "pushd ../ && (yarn clean; popd;)", "clean-ios": "type xcodebuild &> /dev/null && (xcodebuild -project ./ios/example.xcodeproj -alltargets clean && rm -rf ./ios/build);", "clean-node": "rm -rf node_modules/;", - "clean:install": "yarn clean && yarn install" + "clean:install": "yarn clean && yarn install-aztec && yarn install" }, "dependencies": { "react": "16.3.1", diff --git a/package.json b/package.json index 5b7a0ccfaedbc..448c04fa6eb95 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "clean-metro": "rm -rf $TMPDIR/metro-cache-*; rm -rf $TMPDIR/metro-bundler-cache-*;", "clean-node": "rm -rf node_modules/;", "clean-react": "rm -rf $TMPDIR/react-*; rm -rf $TMPDIR/react-native-packager-cache-*;", - "clean-watchman": "watchman watch-del-all;" + "clean-watchman": "watchman watch-del-all;", + "clean:install": "yarn clean && yarn install" }, "peerDependencies": { "react": "16.3.1",