Skip to content

Commit df23f97

Browse files
committed
Use package.json to specify node deps
1 parent 55757e7 commit df23f97

5 files changed

Lines changed: 20 additions & 7 deletions

File tree

.github/workflows/documentation.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ jobs:
2626
node-version: '14'
2727
- name: Set up Virtualenv
2828
run: pip install virtualenv
29-
- name: Set up jsdoc
30-
run: npm install -g 'jsdoc@3.6.7'
3129
- name: Checkout
3230
uses: actions/checkout@v2
3331
with:
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ RUN apt-get -qqy update \
2929
RUN pip install --upgrade pip \
3030
&& pip install virtualenv
3131

32-
# Pin to the same version that gecko is using, since that's well tested with sphinx-js.
33-
RUN npm install -g 'jsdoc@3.6.7'
34-
3532
WORKDIR /app/
33+
34+
COPY ./package.json ./
35+
RUN npm install .
36+
ENV PATH=/app/node_modules/.bin:$PATH

docs/frontend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def docker_build(tag="wpt:docs"):
7171
"build",
7272
"--pull",
7373
"--tag", tag,
74-
os.path.join(here, "docker")])
74+
here])
7575

7676
def docker_run(**kwargs):
7777
cmd = ["docker", "run"]
@@ -116,7 +116,7 @@ def build(_venv, **kwargs):
116116
"--ignore", "**/.*",
117117
"--ignore", "**/#*",
118118
"--ignore", "docs/frontend.py",
119-
"--ignore", "docs/docker/Dockerfile"]
119+
"--ignore", "docs/Dockerfile"]
120120
else:
121121
executable = "sphinx-build"
122122
extras = []

docs/package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "wpt-docs",
3+
"description": "This package file is for node modules used in web-platform-tests docs",
4+
"repository": {},
5+
"license": "BSD",
6+
"devDependencies": {
7+
"jsdoc": "^3.6.7"
8+
},
9+
"version": "1.0.0",
10+
"private": true
11+
}

tools/ci/website_build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ git rm -rf .
3939

4040
# Build the website
4141
cd ../..
42+
npm install ./docs
43+
export PATH="$PWD/node_modules/.bin:$PATH"
44+
4245
./wpt build-docs
4346

4447
cd docs/_build

0 commit comments

Comments
 (0)