|
@@ -15,13 +15,6 @@ nvm install stable
|
15
|
15
|
nvm use stable
|
16
|
16
|
```
|
17
|
17
|
|
18
|
|
-* Latest stable Yarn:
|
19
|
|
-
|
20
|
|
-```
|
21
|
|
-curl -o- -L https://yarnpkg.com/install.sh | bash
|
22
|
|
-export PATH=$PATH:$HOME/.yarn/bin
|
23
|
|
-```
|
24
|
|
-
|
25
|
18
|
* Android SDK:
|
26
|
19
|
|
27
|
20
|
```
|
|
@@ -52,28 +45,28 @@ Then:
|
52
|
45
|
1. Install dependencies:
|
53
|
46
|
|
54
|
47
|
```
|
55
|
|
- yarn install
|
|
48
|
+ npm install
|
56
|
49
|
```
|
57
|
50
|
|
58
|
51
|
1. Run the playground project in Android and iOS so that you can get a feel for the project.
|
59
|
|
-
|
60
|
|
- 1. `yarn start` to get the package running in a terminal, leave it open
|
61
|
52
|
|
62
|
|
- 1. iOS: `yarn xcode` & run the project from XCode
|
63
|
|
-
|
64
|
|
- 1. Android: Open the app in Android Studio and click `Run`
|
|
53
|
+ 1. `npm run start` to get the package running in a terminal, leave it open
|
|
54
|
+
|
|
55
|
+ 1. iOS: `npm run xcode` & run the project from XCode
|
|
56
|
+
|
|
57
|
+ 1. Android: Open the app in Android Studio and click `Run`
|
65
|
58
|
|
66
|
59
|
1. Run the tests. Before you start changing things, make sure everything works.
|
67
|
60
|
|
68
|
61
|
```
|
69
|
|
- yarn test-all
|
|
62
|
+ npm run test-all
|
70
|
63
|
```
|
71
|
64
|
|
72
|
65
|
## Troubleshooting
|
73
|
66
|
|
74
|
67
|
* If the tests fail with an error like `Ineligible destinations for the "ReactNativeNavigation" scheme`, double check that you have the latest XCode installed.
|
75
|
68
|
* If the tests fail because an Android emulator isn't available (something like `com.android.builder.testing.api.DeviceException: No connected devices!`), start the Android project from Android Studio and leave the emulator running, then try again.
|
76
|
|
-* If the tests fail with an error such as:
|
|
69
|
+* If the tests fail with an error such as:
|
77
|
70
|
|
78
|
71
|
```js
|
79
|
72
|
|
|
@@ -82,7 +75,7 @@ Then:
|
82
|
75
|
SyntaxError: Unexpected token (
|
83
|
76
|
|
84
|
77
|
```
|
85
|
|
-
|
|
78
|
+
|
86
|
79
|
You probably have an old node version which doesn't support async functions. Update your node using nvm according to the instructions above.
|
87
|
80
|
|
88
|
81
|
## Workflow
|
|
@@ -111,17 +104,17 @@ No PR will be accepted without adequate test coverage.
|
111
|
104
|
|
112
|
105
|
| Command | Description |
|
113
|
106
|
| ------- | ----------- |
|
114
|
|
-| `yarn install` | installs dependencies |
|
115
|
|
-| `yarn clean` | cleans all build directories, stops packager, fixes flakiness by removing watchman cache, etc. |
|
116
|
|
-| `yarn start` | starts the react-native packager for local debugging |
|
117
|
|
-| `yarn xcode` | for convenience, opens xcode in this project |
|
118
|
|
-| `yarn install-android` | builds playground debug/release version and installs on running android devices/emulators. <br> **Options:** `-- release` |
|
119
|
|
-| `yarn uninstall-android` | uninstalls playground from running android devices/simulators |
|
120
|
|
-| `yarn test-js` | runs javascript tests and coverage report |
|
121
|
|
-| `yarn test-watch` | runs javascript tests in watch mode (can also use the provided wallaby config) |
|
122
|
|
-| `yarn test-unit-ios` | runs ios unit tests in debug/release <br> **Options:** `-- release` |
|
123
|
|
-| `yarn test-unit-android` | runs android unit tests in debug/release <br> **Options:** `-- release` |
|
124
|
|
-| `yarn test-e2e-ios` | runs the ios e2e suite (with detox) in debug/release |
|
125
|
|
-| `yarn test-e2e-android` | runs the android e2e suite (with uiautomator) in debug/release on running devices/emulators <br> **Options:** `-- [release] [just com.TestClass#testMethod]` |
|
126
|
|
-| `yarn test-all` | runs all tests in parallel |
|
|
107
|
+| `npm install` | installs dependencies |
|
|
108
|
+| `npm run clean` | cleans all build directories, stops packager, fixes flakiness by removing watchman cache, etc. |
|
|
109
|
+| `npm run start` | starts the react-native packager for local debugging |
|
|
110
|
+| `npm run xcode` | for convenience, opens xcode in this project |
|
|
111
|
+| `npm run install-android` | builds playground debug/release version and installs on running android devices/emulators. <br> **Options:** `-- release` |
|
|
112
|
+| `npm run uninstall-android` | uninstalls playground from running android devices/simulators |
|
|
113
|
+| `npm run test-js` | runs javascript tests and coverage report |
|
|
114
|
+| `npm run test-watch` | runs javascript tests in watch mode (can also use the provided wallaby config) |
|
|
115
|
+| `npm run test-unit-ios` | runs ios unit tests in debug/release <br> **Options:** `-- release` |
|
|
116
|
+| `npm run test-unit-android` | runs android unit tests in debug/release <br> **Options:** `-- release` |
|
|
117
|
+| `npm run test-e2e-ios` | runs the ios e2e suite (with detox) in debug/release |
|
|
118
|
+| `npm run test-e2e-android` | runs the android e2e suite (with uiautomator) in debug/release on running devices/emulators <br> **Options:** `-- [release] [just com.TestClass#testMethod]` |
|
|
119
|
+| `npm run test-all` | runs all tests in parallel |
|
127
|
120
|
|