Skip to content

Commit f8f047d

Browse files
committed
Publish docs version 20.x
1 parent f34f32d commit f8f047d

File tree

1 file changed

+45
-5
lines changed

1 file changed

+45
-5
lines changed

website/versioned_docs/version-20.x/contributing/code/setting-up-the-dev-environment.md

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,51 @@ Currently, we require `lts/iron` (Node.js 20.x) for our development environment.
1616

1717
:::tip
1818

19-
The exhaustive list of LTS codenames (e.g. `lts/iron`) can be found at [CODENAMES.md](https://github.com/nodejs/Release/blob/main/CODENAMES.md) in the Node.js repository.
19+
The exhaustive list of LTS codenames (e.g. `lts/iron`) can be found at [CODENAMES.md](https://github.com/nodejs/Release/blob/main/CODENAMES.md) in the Node.js repository.
2020

2121
:::
2222

2323
## Setting Up The Monorepo
2424

25-
Our repository is a monorepo managed with [Yarn 4 workspaces](https://yarnpkg.com/features/workspaces), which means it contains multiple Detox-related projects and packages. [Read more about our repository structure](../code/overview.md#repository-structure).
25+
Our repository is a monorepo managed with Yarn workspaces. [Read more about our repository structure](../code/overview.md#repository-structure).
2626

2727
To set up the monorepo locally, follow these steps:
2828

29-
Clone the repository and navigate to the project directory:
29+
### 1. Enable Corepack
30+
31+
Corepack is Node.js's built-in package manager manager. Enable it to use the correct Yarn version:
32+
33+
```bash
34+
corepack enable
35+
```
36+
37+
### 2. Clone the Repository
3038

3139
```bash
3240
git clone git@github.com:wix/Detox.git
33-
cd detox
41+
cd Detox
3442
git submodule update --init --recursive
3543
```
3644

37-
From the project's root directory, install dependencies and link the internal projects:
45+
### 3. Install Dependencies
46+
47+
```bash
48+
yarn install
49+
```
50+
51+
:::note For Wix Internal Contributors
52+
53+
Set the internal registry before installing:
3854

3955
```bash
56+
export YARN_NPM_REGISTRY_SERVER="<company's private npm registry>"
4057
yarn install
4158
```
4259

60+
You can add this export to your shell profile (`~/.zshrc` or `~/.bashrc`) to make it permanent.
61+
62+
:::
63+
4364
## Installing Common Dependencies
4465

4566
### React-Native CLI
@@ -66,6 +87,25 @@ brew install watchman
6687
gem install xcpretty
6788
```
6889

90+
## Switching React Native Versions
91+
92+
To test against different React Native versions:
93+
94+
```bash
95+
REACT_NATIVE_VERSION=0.77.0 ./scripts/change_all_react_native_versions.sh
96+
```
97+
98+
This updates the relevant `package.json` files and regenerates the lock file.
99+
100+
## Common Commands
101+
102+
| Command | Description |
103+
|---------|-------------|
104+
| `yarn install` | Install all dependencies |
105+
| `yarn workspaces foreach -A run build` | Build all packages |
106+
| `yarn workspace detox test` | Run detox tests |
107+
| `yarn workspace detox lint` | Run linting |
108+
69109
[react-native-cli]: https://www.npmjs.com/package/react-native-cli
70110
[Watchman]: https://facebook.github.io/watchman/
71111
[xcpretty]: https://github.com/xcpretty/xcpretty

0 commit comments

Comments
 (0)