Skip to content

Commit e142da5

Browse files
committed
Fixed docs
1 parent 7c891aa commit e142da5

3 files changed

Lines changed: 43 additions & 35 deletions

File tree

website/docs/docs/docs-playground-app.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ sidebar_label: Playground app
88

99
If you want to have a quick look around and test things out, you can run the playground app, bundled with this repo.
1010

11-
1. Install dependencies via `npm install` (if you haven't already) and `npm run pod-install` (for iOS)
11+
1. Install dependencies via `yarn install` (if you haven't already) and `yarn pod-install` (for iOS)
1212
2. Run the playground project on Android and iOS
13-
- `npm run start` to get the packager running in the terminal, leave it open
14-
- **iOS**: open `./playground/ios` in Xcode and run it
13+
- `yarn start` to get the packager running in the terminal, leave it open
14+
- **iOS**: open `./playground/ios/playground.xcworkspace` in Xcode and run it
1515
- **Android**: open `./playground/android` in Android Studio and run it
1616
3. You can run tests if / when you need to (list of scripts [available here](meta-contributing#scripts)). Before
1717
you start changing things, make sure everything works.
18-
- To easily run all tests in parallel `npm run test-all`
18+
- To easily run all tests in parallel `yarn test-all`

website/docs/docs/docs-showcases.mdx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,17 @@ The playground example is a place where we showcase and test all features of rea
2929
```bash
3030
git clone https://github.com/wix/react-native-navigation
3131
cd react-native-navigation
32-
npm install
32+
yarn install
3333

3434
# for iOS:
35-
npm run xcode # Opens XCode
36-
npm start # Starts the packager on linux like systems
35+
yarn pod-install # Install iOS pods
36+
yarn xcode # Opens XCode
37+
yarn start # Starts the packager
3738

3839
# for Android:
39-
# 1. open Android Studio inside ".\playground"
40-
# 2. start a emulator
41-
npm run start-windows # Start the packager if you are on a windows system
40+
# 1. open Android Studio inside "./playground/android"
41+
# 2. start an emulator
42+
yarn start # Start the packager
4243

4344
# Run the app in Simulator or on Device from within XCode/Android Studio
4445
```

website/docs/docs/meta-contributing.mdx

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The following steps are required in order to make the project work with your loc
3030

3131
#### 2.1
3232

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`.
3434

3535
#### 2.2
3636

@@ -113,35 +113,42 @@ The project uses [ESLint](https://eslint.org/) with [Prettier](https://prettier.
113113

114114
A pre-commit hook will verify that the linter passes when committing.
115115

116-
### Playground app Folder Structure
116+
### Project Folder Structure
117117

118118
| Folder | Description |
119119
| ------ | ----------- |
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 |
130130

131131
### Scripts
132132

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+
133135
| Command | Description |
134136
| ------- | ----------- |
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 |
142+
| `yarn pod-install` | installs iOS pods (runs `yarn workspace react-native-navigation-playground pod-install`) |
143+
| `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` |
149+
| `yarn test-snapshot-ios` | runs ios snapshot tests <br></br> **Options:** `-- --release` |
150+
| `yarn test-e2e-ios-ci` | runs the ios e2e tests using [detox](https://github.com/wix/detox) in CI mode (release, multi-device) |
151+
| `yarn test-e2e-android-ci` | runs the android e2e tests using [detox](https://github.com/wix/detox) in CI mode (release, multi-device) |
152+
| `yarn workspace react-native-navigation-playground test-e2e-ios` | runs the ios e2e tests using [detox](https://github.com/wix/detox) in debug/release <br></br> **Options:** `-- --release` |
153+
| `yarn workspace react-native-navigation-playground test-e2e-android` | runs the android e2e tests using [detox](https://github.com/wix/detox) in debug/release <br></br> **Options:** `-- --release` |
154+
| `yarn test-all` | runs all tests in parallel (js, autolink, unit, snapshot, e2e) |

0 commit comments

Comments
 (0)