Skip to content

Commit 22ab0f9

Browse files
committed
Add Makefile with shortcuts + updated theme file from the first try at running the build
1 parent b654b40 commit 22ab0f9

File tree

5 files changed

+20
-4
lines changed

5 files changed

+20
-4
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ sphinx_rtd_theme/static/fonts/RobotoSlab/
2424
sphinx_rtd_theme/static/js/html5shiv.min.js
2525
sphinx_rtd_theme/static/js/html5shiv-printshiv.min.js
2626
.nvmrc
27+
28+
.container_id

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM python:2-alpine
33

44
RUN apk add --update npm
55

6-
RUN mkdir -p /project/bin
6+
RUN mkdir -p /project/src/
77

88
WORKDIR /project
99

@@ -21,6 +21,8 @@ RUN npm install --package-lock-only &&\
2121
npm audit fix &&\
2222
npm install
2323

24+
COPY webpack.common.js webpack.dev.js webpack.prod.js /project/
25+
2426
COPY docker-entrypoint.sh /entrypoint.sh
2527
RUN chmod +x /entrypoint.sh
2628

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
SHELL := /bin/bash
2+
CWD := $(shell cd -P -- '$(shell dirname -- "$0")' && pwd -P)
3+
4+
docker-images:
5+
docker build -t sphinx_rtd_theme:latest .
6+
7+
docker-run:
8+
rm -f .container_id
9+
docker run --cidfile=.container_id --mount type=bind,source="$(CWD)/src",target=/project/src,readonly sphinx_rtd_theme:latest
10+
11+
docker-copy-assets:
12+
docker cp "$(shell cat .container_id):/project/sphinx_rtd_theme" .

docker-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
cp -R /git-readonly /git
3+
cd /project
44

5-
cd /git
65
npm run build
6+

sphinx_rtd_theme/static/css/theme.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)