|
@@ -0,0 +1,72 @@
|
|
1
|
+# Folder Structure
|
|
2
|
+* `lib`: The project itself composed of:</br>
|
|
3
|
+`lib/android`: android sources and unit tests</br>
|
|
4
|
+`lib/ios`: iOS sources and unit tests</br>
|
|
5
|
+`lib/src`: javascript sources and unit tests</br>
|
|
6
|
+`lib/src/index.js`: the entry point for `import Navigation from 'react-native-navigation`
|
|
7
|
+
|
|
8
|
+* `e2e`: [detox](https://github.com/wix/detox) iOS e2e tests (in the future, once detox supports it, we will have android e2e here as well)
|
|
9
|
+
|
|
10
|
+* `AndroidE2E`: Android e2e tests using native uiautomator
|
|
11
|
+
|
|
12
|
+* `playground`: The end-user project all e2e tests run against. Contains its own `src`, `android` and `ios`. Does not have its own package.json, depends on the local `<root>/lib` in order not to go through npm.
|
|
13
|
+
|
|
14
|
+* `integration`: misc javascript integration tests
|
|
15
|
+* `scripts`: all scripts
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+# Running locally
|
|
19
|
+
|
|
20
|
+### Environment requirements
|
|
21
|
+
|
|
22
|
+* Mac OSX
|
|
23
|
+* Latest stable XCode
|
|
24
|
+* Latest stable Node:
|
|
25
|
+
|
|
26
|
+```
|
|
27
|
+curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
|
|
28
|
+export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
|
29
|
+nvm install stable
|
|
30
|
+nvm use stable
|
|
31
|
+```
|
|
32
|
+
|
|
33
|
+* Latest stable Yarn:
|
|
34
|
+
|
|
35
|
+```
|
|
36
|
+curl -o- -L https://yarnpkg.com/install.sh | bash
|
|
37
|
+```
|
|
38
|
+
|
|
39
|
+* Android SDK
|
|
40
|
+* fbsimctl:
|
|
41
|
+
|
|
42
|
+```
|
|
43
|
+brew tap facebook/fb && brew install fbsimctl
|
|
44
|
+```
|
|
45
|
+
|
|
46
|
+### Scripts
|
|
47
|
+
|
|
48
|
+`yarn install`: installs dependencies
|
|
49
|
+
|
|
50
|
+`yarn run clean`: cleans all build directories, stops packager, fixes flakiness by removing watchman cache, etc.
|
|
51
|
+
|
|
52
|
+`yarn run start`: starts the react-native packager for local debugging
|
|
53
|
+
|
|
54
|
+`yarn run xcode`: for convenience, opens xcode in this project
|
|
55
|
+
|
|
56
|
+`yarn run install-android [-- release]`: builds playground debug/release version and installs on running android devices/emulators
|
|
57
|
+
|
|
58
|
+`yarn run uninstall-android`: uninstalls playground from running android devices/simulators
|
|
59
|
+
|
|
60
|
+`yarn run test-js`: runs javascript tests and coverage report
|
|
61
|
+
|
|
62
|
+`yarn run test-watch`: runs javascript tests in watch mode (can also use the provided wallaby config)
|
|
63
|
+
|
|
64
|
+`yarn run test-unit-ios [-- release]`: runs ios unit tests in debug/release
|
|
65
|
+
|
|
66
|
+`yarn run test-unit-android [-- release]`: runs android unit tests in debug/release
|
|
67
|
+
|
|
68
|
+`yarn run test-e2e-ios [-- release]`: runs the ios e2e suite (with detox) in debug/release
|
|
69
|
+
|
|
70
|
+`yarn run test-e2e-android [-- release]`: runs the android e2e suite (with uiautomator) in debug/release on running devices/emulators
|
|
71
|
+
|
|
72
|
+`yarn run test-all`: runs all tests
|