Browse Source

starting the packager works

Daniel Zlotin 7 years ago
parent
commit
7fd3e87db4

+ 7
- 1
package.json View File

@@ -26,7 +26,13 @@
26 26
   "main": "lib/src/index.js",
27 27
   "scripts": {
28 28
     "build": ":",
29
-    "start": "adb reverse tcp:8081 tcp:8081; watchman watch-del-all; node ./node_modules/react-native/local-cli/cli.js start",
29
+    "xcode": "open playground/ios/playground.xcodeproj",
30
+    "install-android": "cd playground/android && ./gradlew installDebug",
31
+    "uninstall-android": "cd playground/android && ./gradlew uninstallAll",
32
+    "xcodeunit": "node ./scripts/unit.ios.js",
33
+    "e2e-android": "node ./scripts/e2e.android.js",
34
+    "e2e-ios": "node ./scripts/e2e.ios.js",
35
+    "start": "adb reverse tcp:8081 tcp:8081; watchman watch-del-all; node ./node_modules/react-native/local-cli/cli.js start --root=./playground",
30 36
     "test-js": "eslint lib/src integration scripts playground/src playground/e2e playground/scripts && BABEL_ENV=test jest --coverage",
31 37
     "test-android": "node ./scripts/test.android.js",
32 38
     "test-ios": "node ./scripts/test.ios.js",

+ 1
- 1
playground/android/app/build.gradle View File

@@ -1,5 +1,5 @@
1 1
 apply plugin: "com.android.application"
2
-apply from: "../../node_modules/react-native/react.gradle"
2
+apply from: "../../../node_modules/react-native/react.gradle"
3 3
 
4 4
 android {
5 5
     compileSdkVersion 25

+ 1
- 1
playground/android/build.gradle View File

@@ -18,7 +18,7 @@ allprojects {
18 18
         jcenter()
19 19
         maven {
20 20
             // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
21
-            url "$rootDir/../node_modules/react-native/android"
21
+            url "$rootDir/../../node_modules/react-native/android"
22 22
         }
23 23
     }
24 24
 }

+ 1
- 1
playground/android/settings.gradle View File

@@ -2,4 +2,4 @@ rootProject.name = 'playground'
2 2
 
3 3
 include ':app'
4 4
 include ':react-native-navigation'
5
-project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation/android/app/')
5
+project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../../lib/android/app/')

+ 0
- 27
playground/package.json View File

@@ -1,27 +0,0 @@
1
-{
2
-  "name": "playground",
3
-  "version": "1.0.0",
4
-  "private": true,
5
-  "scripts": {
6
-    "quickinstall": "node ./scripts/quickInstall.js",
7
-    "start": "adb reverse tcp:8081 tcp:8081; watchman watch-del-all; node ./node_modules/react-native/local-cli/cli.js start",
8
-    "xcode": "open ios/playground.xcodeproj",
9
-    "android": "cd android && ./gradlew installDebug",
10
-    "uninstall-android": "cd android && ./gradlew uninstallAll",
11
-    "xcodeunit": "node ./scripts/unit.ios.js",
12
-    "e2e-android": "node ./scripts/e2e.android.js",
13
-    "e2e-ios": "node ./scripts/e2e.ios.js"
14
-  },
15
-  "//": "use react-native-navigation: 2.x.x --> we are manually installing it from a script for quicker workflow. Along with detox and shell-utils",
16
-  "dependencies": {},
17
-  "babel": {
18
-    "env": {
19
-      "test": {
20
-        "presets": [
21
-          "react-native"
22
-        ],
23
-        "retainLines": true
24
-      }
25
-    }
26
-  }
27
-}