You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/docs/meta-contributing.mdx
+32-25Lines changed: 32 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ The following steps are required in order to make the project work with your loc
30
30
31
31
#### 2.1
32
32
33
-
Install React-Native-Navigation as you'll usually do in your project, using `npm install --save react-native-navigation`.
33
+
Install React-Native-Navigation as you'll usually do in your project, using `yarn add react-native-navigation` or `npm install --save react-native-navigation`.
34
34
35
35
#### 2.2
36
36
@@ -113,35 +113,42 @@ The project uses [ESLint](https://eslint.org/) with [Prettier](https://prettier.
113
113
114
114
A pre-commit hook will verify that the linter passes when committing.
115
115
116
-
### Playground app Folder Structure
116
+
### Project Folder Structure
117
117
118
118
| Folder | Description |
119
119
| ------ | ----------- |
120
-
|`lib`|The project itself composed of:|
121
-
|`lib/android`|android sources and unit tests |
122
-
|`lib/ios`| iOS sources and unit tests |
123
-
|`lib/src`|TypeScript sources and unit tests|
124
-
|`lib/dist`|compiled javascript sources and unit tests|
125
-
|`lib/dist/index.js`|the entry point for `import Navigation from 'react-native-navigation'`|
126
-
|`e2e`|[detox](https://github.com/wix/detox) e2e tests on both Android and iOS |
127
-
|`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` for faster local development (no need to `npm install` locally).|
128
-
|`integration`|misc javascript integration tests, proving integration with other libraries like redux|
129
-
|`scripts`|all scripts |
120
+
|`src`|TypeScript sources and unit tests|
121
+
|`android`|Android sources and unit tests |
122
+
|`ios`| iOS sources and unit tests |
123
+
|`lib`|Compiled JavaScript and TypeScript definitions (generated by `react-native-builder-bob`)|
124
+
|`lib/module/index.js`|The entry point for `import Navigation from 'react-native-navigation'`|
125
+
|`playground`|The playground app workspace. Contains its own `src`, `android`, `ios`, and `package.json`. All e2e tests run against this app.|
126
+
|`playground/e2e`|[detox](https://github.com/wix/detox) e2e tests on both Android and iOS |
127
+
|`integration`|Misc JavaScript integration tests, proving integration with other libraries like redux|
128
+
|`scripts`|All build and test scripts|
129
+
|`autolink`|Autolinking scripts for React Native CLI|
130
130
131
131
### Scripts
132
132
133
+
This project uses [Yarn workspaces](https://yarnpkg.com/features/workspaces). The root workspace contains the main library, and the `playground` workspace contains the playground app for testing.
134
+
133
135
| Command | Description |
134
136
| ------- | ----------- |
135
-
|`npm install`| installs dependencies |
136
-
|`npm run build`| compiles TypeScript sources `./lib/src` into javascript `./lib/dist`|
137
-
|`npm run clean`| cleans all build directories, stops packager, fixes flakiness by removing watchman cache, etc. |
138
-
|`npm run start`| starts the react-native packager for local debugging |
139
-
|`npm run xcode`| for convenience, opens xcode in this project |
140
-
|`npm run install-android`| builds playground debug/release version and installs on running android devices/emulators. <br></br> **Options:**`-- --release`|
141
-
|`npm run uninstall-android`| uninstalls playground from running android devices/simulators |
142
-
|`npm run test-js`| runs javascript tests and coverage report |
143
-
|`npm run test-unit-ios`| runs ios unit tests in debug/release <br></br> **Options:**`-- --release`|
144
-
|`npm run test-unit-android`| runs android unit tests in debug/release <br></br> **Options:**`-- --release`|
145
-
|`npm run test-e2e-ios`| runs the ios e2e tests using [detox](https://github.com/wix/detox) in debug/release <br></br> **Options:**`-- --release`|
146
-
|`npm run test-e2e-android`| runs the android e2e tests using [detox](https://github.com/wix/detox) in debug/release <br></br> **Options:**`-- --release`|
147
-
|`npm run test-all`| runs all tests in parallel |
137
+
|`yarn install`| installs dependencies for all workspaces |
138
+
|`yarn prepare`| compiles TypeScript sources `./src` into JavaScript `./lib` (runs automatically on install) |
139
+
|`yarn clean`| cleans all build directories, stops packager, fixes flakiness by removing watchman cache, etc. |
140
+
|`yarn start`| starts the react-native packager for local debugging |
141
+
|`yarn xcode`| for convenience, opens xcode in this project |
|`yarn install-android`| builds playground debug/release version and installs on running android devices/emulators. <br></br> **Options:**`-- --release`|
144
+
|`yarn uninstall-android`| uninstalls playground from running android devices/simulators |
145
+
|`yarn test-js`| runs javascript tests and coverage report |
146
+
|`yarn test-autolink`| runs autolink tests |
147
+
|`yarn test-unit-ios`| runs ios unit tests in debug/release <br></br> **Options:**`-- --release`|
148
+
|`yarn test-unit-android`| runs android unit tests in debug/release <br></br> **Options:**`-- --release`|
0 commit comments