Skip to content

Commit 16a5f2e

Browse files
authored
docs: update CONTRIBUTING with new flow (#4502)
1 parent e705948 commit 16a5f2e

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

docs/CONTRIBUTING.md

+19-7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- [Development workflow](#development-workflow)
1010
- [Updates to VS Code](#updates-to-vs-code)
1111
- [Build](#build)
12+
- [Help](#help)
1213
- [Test](#test)
1314
- [Unit tests](#unit-tests)
1415
- [Script tests](#script-tests)
@@ -77,16 +78,23 @@ we'll guide you.
7778

7879
## Development workflow
7980

80-
```shell
81-
yarn
82-
yarn watch
83-
# Visit http://localhost:8080 once the build is completed.
84-
```
81+
The current development workflow is a bit tricky because we have this repo and we use our `cdr/vscode` fork inside it with [`yarn link`](https://classic.yarnpkg.com/lang/en/docs/cli/link/).
82+
83+
Here are these steps you should follow to get your dev environment setup:
8584

86-
`yarn watch` will live reload changes to the source.
85+
1. `git clone https://github.com/cdr/code-server.git` - Clone `code-server`
86+
2. `git clone https://github.com/cdr/vscode.git` - Clone `vscode`
87+
3. `cd vscode && git checkout code-server-v2` - checkout the branch we use (not the default)
88+
4. `cd vscode && yarn install` - install the dependencies in the `vscode` repo
89+
5. `cd code-server && yarn install` - install the dependencies in the `code-server` repo
90+
6. `cd vscode && yarn link` - use `yarn` to create a symlink to the `vscode` repo (`code-oss-dev` package)
91+
7. `cd code-server && yarn link code-oss-dev --modules-folder vendor/modules` - links your local `vscode` repo (`code-oss-dev` package) inside your local version of code-server
92+
8. `cd code-server && yarn watch` - this will spin up code-server on localhost:8080 which you can start developing. It will live reload changes to the source.
8793

8894
### Updates to VS Code
8995

96+
If changes are made and merged into `code-server-v2` in the `cdr/vscode` repo, then you'll need to update the version in the `code-server` repo by following these steps:
97+
9098
1. Update the package tag listed in `vendor/package.json`:
9199

92100
```json
@@ -97,7 +105,7 @@ yarn watch
97105
}
98106
```
99107

100-
2. From the code-server **project root**, run `yarn install`.
108+
1. From the code-server **project root**, run `yarn install`.
101109
Then, test code-server locally to make sure everything works.
102110
1. Check the Node.js version that's used by Electron (which is shipped with VS
103111
Code. If necessary, update your version of Node.js to match.
@@ -139,6 +147,10 @@ yarn package
139147
> If you need your builds to support older distros, run the build commands
140148
> inside a Docker container with all the build requirements installed.
141149
150+
### Help
151+
152+
If you get stuck or need help, you can always start a new GitHub Discussion [here](https://github.com/cdr/code-server/discussions). One of the maintainers will respond and help you out.
153+
142154
## Test
143155

144156
There are four kinds of tests in code-server:

0 commit comments

Comments
 (0)