Daniel Zlotin 8 vuotta sitten
vanhempi
commit
865811b3e0
3 muutettua tiedostoa jossa 13 lisäystä ja 5 poistoa
  1. 1
    1
      playground/package.json
  2. 11
    2
      playground/scripts/quickInstall.js
  3. 1
    2
      scripts/test.ios.js

+ 1
- 1
playground/package.json Näytä tiedosto

@@ -3,7 +3,7 @@
3 3
   "version": "1.0.0",
4 4
   "private": true,
5 5
   "scripts": {
6
-    "postinstall": "node ./scripts/postinstall.js",
6
+    "quickinstall": "node ./scripts/quickInstall.js",
7 7
     "start": "adb reverse tcp:8081 tcp:8081; watchman watch-del-all; react-native start --reset-cache",
8 8
     "xcode": "open ios/playground.xcodeproj",
9 9
     "android": "cd android && ./gradlew installDebug",

playground/scripts/postinstall.js → playground/scripts/quickInstall.js Näytä tiedosto

@@ -7,10 +7,19 @@ function installNavigation() {
7 7
   shellUtils.exec.execSync(`rm ../${navigationTar}`);
8 8
 }
9 9
 
10
-function run() {
10
+function copyNodeModulesFromNavigation() {
11 11
   shellUtils.exec.execSync(`cp -rf ../node_modules ./`);
12
-  shellUtils.exec.execSync(`./scripts/ignoreReactWarnings.rb`);
12
+}
13
+
14
+function run() {
15
+  exec.execSyncSilent(`hardlink ./node_modules/react-native-navigation/ -u || true`);
16
+  exec.execSyncSilent(`rm -rf ./node_modules || true`);
17
+  copyNodeModulesFromNavigation();
13 18
   installNavigation();
19
+  shellUtils.exec.execSync(`./scripts/ignoreReactWarnings.rb`);
20
+  if (!process.env.CI) {
21
+    exec.execSyncSilent(`hardlink ../ ./node_modules/react-native-navigation/ || true`);
22
+  }
14 23
 }
15 24
 
16 25
 run();

+ 1
- 2
scripts/test.ios.js Näytä tiedosto

@@ -2,8 +2,7 @@ const exec = require('shell-utils').exec;
2 2
 
3 3
 function run() {
4 4
   process.chdir('./playground');
5
-  exec.execSync(`hardlink node_modules/react-native-navigation/ -u || true`);
6
-  exec.execSync(`yarn install`);
5
+  exec.execSync(`yarn run quickinstall`);
7 6
   exec.execSync(`yarn run e2e release`);
8 7
   process.chdir('../');
9 8
 }