Skip to content

Commit a346c6d

Browse files
committed
Document npm module install dependencies
1 parent 502c262 commit a346c6d

File tree

3 files changed

+56
-5
lines changed

3 files changed

+56
-5
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,16 @@ sudo systemctl enable --now code-server
2828

2929
```bash
3030
curl -sSOL https://github.com/cdr/code-server/releases/download/3.3.0/code-server-3.3.0-amd64.rpm
31-
sudo dnf install code-server-3.3.0-amd64.rpm
31+
sudo yum install -y code-server-3.3.0-amd64.rpm
3232
sudo systemctl enable --now code-server
3333
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
3434
```
3535

3636
### npm
3737

38+
**note:** Installing via `npm` requires building native module dependencies. See [./doc/npm.md](./doc/npm.md)
39+
for the dependency install process depending on your OS.
40+
3841
```bash
3942
npm install -g code-server
4043
code-server

doc/CONTRIBUTING.md

+20-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@
33
- [Detailed CI and build process docs](../ci)
44
- [Our VS Code Web docs](../src/node/app)
55

6-
## Development Workflow
6+
## Requirements
7+
8+
Please refer to [VS Code's prerequisites](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites).
9+
10+
Differences:
711

8-
- [VS Code prerequisites](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites)
12+
- We are not constrained by node version
13+
- We use [fnpm](https://github.com/goreleaser/nfpm) to build .deb and .rpm packages
14+
15+
## Development Workflow
916

1017
```shell
1118
yarn
@@ -33,8 +40,6 @@ works internally.
3340

3441
## Build
3542

36-
- [VS Code prerequisites](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites)
37-
3843
```shell
3944
yarn
4045
yarn vscode
@@ -45,3 +50,14 @@ cd release
4550
yarn --production
4651
node . # Run the built JavaScript with Node.
4752
```
53+
54+
Now you can make it static and build packages with:
55+
56+
```
57+
yarn release:static
58+
yarn test:static-release
59+
yarn package
60+
```
61+
62+
The static release will be in `./release-static` and the release packages
63+
(.deb, .rpm, self contained release) in `./release-packages`.

doc/npm.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# npm Install Requirements
2+
3+
If you're installing the npm module you'll need certain dependencies to build
4+
the native modules used by VS Code.
5+
6+
## Ubuntu, Debian
7+
8+
```bash
9+
sudo apt-get install -y \
10+
build-essential \
11+
pkg-config \
12+
libx11-dev \
13+
libxkbfile-dev \
14+
libsecret-1-dev
15+
```
16+
17+
## Fedora, Red Hat, SUSE
18+
19+
```bash
20+
sudo yum groupinstall -y 'Development Tools'
21+
sudo yum config-manager --set-enabled PowerTools
22+
sudo yum install -y python2 libsecret-devel libX11-devel libxkbfile-devel
23+
npm config set python python2
24+
```
25+
26+
## macOS
27+
28+
Install [Xcode](https://developer.apple.com/xcode/downloads/) and run:
29+
30+
```bash
31+
xcode-select --install
32+
```

0 commit comments

Comments
 (0)