2020-02-19 07:07:01 +07:00
|
|
|
# Contributing
|
|
|
|
|
2020-04-30 18:52:54 +07:00
|
|
|
- [Detailed CI and build process docs](../ci)
|
|
|
|
- [Our VS Code Web docs](../src/node/app)
|
|
|
|
|
2020-05-13 10:11:31 +07:00
|
|
|
## Requirements
|
|
|
|
|
|
|
|
Please refer to [VS Code's prerequisites](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites).
|
|
|
|
|
|
|
|
Differences:
|
2020-02-19 07:07:01 +07:00
|
|
|
|
2020-05-15 08:37:58 +07:00
|
|
|
- We require at least node v12 but later versions should work
|
2020-05-13 10:11:31 +07:00
|
|
|
- We use [fnpm](https://github.com/goreleaser/nfpm) to build .deb and .rpm packages
|
|
|
|
|
|
|
|
## Development Workflow
|
2020-02-19 07:07:01 +07:00
|
|
|
|
|
|
|
```shell
|
|
|
|
yarn
|
|
|
|
yarn vscode
|
|
|
|
yarn watch # Visit http://localhost:8080 once completed.
|
|
|
|
```
|
|
|
|
|
2020-04-15 05:22:52 +07:00
|
|
|
To develop inside of an isolated docker container:
|
|
|
|
|
|
|
|
```shell
|
2020-04-30 18:52:54 +07:00
|
|
|
./ci/dev/container/exec.sh
|
2020-04-15 05:22:52 +07:00
|
|
|
|
|
|
|
root@12345:/code-server# yarn
|
|
|
|
root@12345:/code-server# yarn vscode
|
|
|
|
root@12345:/code-server# yarn watch
|
|
|
|
```
|
|
|
|
|
2020-02-19 07:07:01 +07:00
|
|
|
Any changes made to the source will be live reloaded.
|
|
|
|
|
|
|
|
If changes are made to the patch and you've built previously you must manually
|
|
|
|
reset VS Code then run `yarn vscode:patch`.
|
|
|
|
|
|
|
|
Some docs are available at [../src/node/app](../src/node/app) on how code-server
|
|
|
|
works internally.
|
|
|
|
|
|
|
|
## Build
|
|
|
|
|
|
|
|
```shell
|
|
|
|
yarn
|
2020-02-27 03:48:08 +07:00
|
|
|
yarn vscode
|
2020-02-19 07:07:01 +07:00
|
|
|
yarn build
|
2020-04-30 18:52:54 +07:00
|
|
|
yarn build:vscode
|
|
|
|
yarn release
|
2020-05-09 03:31:42 +07:00
|
|
|
cd release
|
|
|
|
yarn --production
|
|
|
|
node . # Run the built JavaScript with Node.
|
2020-02-19 07:07:01 +07:00
|
|
|
```
|
2020-05-13 10:11:31 +07:00
|
|
|
|
|
|
|
Now you can make it static and build packages with:
|
|
|
|
|
|
|
|
```
|
|
|
|
yarn release:static
|
|
|
|
yarn test:static-release
|
|
|
|
yarn package
|
|
|
|
```
|
|
|
|
|
2020-05-13 13:35:11 +07:00
|
|
|
The static release will be in `./release-static` and .deb, .rpm and self-contained release in `./release-packages`.
|