Browse Source

fixing install script

Daniel Zlotin 8 years ago
parent
commit
da7fe3a584
3 changed files with 6 additions and 6 deletions
  1. 2
    2
      playground/package.json
  2. 4
    2
      playground/scripts/postinstall.js
  3. 0
    2
      scripts/test.ios.js

+ 2
- 2
playground/package.json View File

11
   },
11
   },
12
   "dependencies": {
12
   "dependencies": {
13
     "react-native": "0.38.0",
13
     "react-native": "0.38.0",
14
-    "react": "15.4.1",
15
-    "react-native-navigation": "file:../"
14
+    "react": "15.4.1"
16
   },
15
   },
16
+  "//": "use react-native-navigation: 2.x.x --> we are manually installing it from a script for quicker workflow",
17
   "devDependencies": {
17
   "devDependencies": {
18
     "detox": "4.x.x",
18
     "detox": "4.x.x",
19
     "detox-server": "1.x.x",
19
     "detox-server": "1.x.x",

+ 4
- 2
playground/scripts/postinstall.js View File

2
 
2
 
3
 shellUtils.exec.execSync(`rm yarn.lock || true`);
3
 shellUtils.exec.execSync(`rm yarn.lock || true`);
4
 shellUtils.exec.execSync(`./scripts/ignoreReactWarnings.rb`);
4
 shellUtils.exec.execSync(`./scripts/ignoreReactWarnings.rb`);
5
-shellUtils.exec.execSync(`rm -rf node_modules/react-native-navigation/node_modules`);
6
-shellUtils.exec.execSync(`rm -rf node_modules/react-native-navigation/playground`);
5
+
6
+shellUtils.exec.execSync(`mkdir -p ./node_modules/react-native-navigation`);
7
+shellUtils.exec.execSync(`cd .. && npm pack`);
8
+//shellUtils.exec.execSync(`tar -xf ../react-native-navigation.tar`);

+ 0
- 2
scripts/test.ios.js View File

3
 function run() {
3
 function run() {
4
   process.chdir('./playground');
4
   process.chdir('./playground');
5
   exec.execSync(`hardlink node_modules/react-native-navigation/ -u || true`);
5
   exec.execSync(`hardlink node_modules/react-native-navigation/ -u || true`);
6
-  const yarnCacheDir = exec.execSyncRead(`yarn cache dir`);
7
-  exec.execSync(`rm -rf ${yarnCacheDir}/*navigation*`);
8
   exec.execSync(`yarn install`);
6
   exec.execSync(`yarn install`);
9
   exec.execSync(`yarn run e2e release`);
7
   exec.execSync(`yarn run e2e release`);
10
   process.chdir('../');
8
   process.chdir('../');