forked from pre-commit/pre-commit.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (34 loc) · 1.18 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# To build scss continuously I use `watch -n 0.1 make build/main.css`
all: install-hooks build/main.css all-hooks.json index.html hooks.html
.PHONY: install-hooks
install-hooks: venv
venv/bin/pre-commit install
build/main.css: venv node_modules build scss/main.scss scss/_variables.scss
venv/bin/pysassc -s compressed scss/main.scss build/main.css
all-hooks.json: venv make_all_hooks.py all-repos.yaml
venv/bin/python make_all_hooks.py
index.html hooks.html: venv all-hooks.json base.mako index.mako hooks.mako make_templates.py
venv/bin/python make_templates.py
venv: requirements-dev.txt Makefile
rm -rf venv
virtualenv venv -ppython3
venv/bin/pip install -r requirements-dev.txt
node_modules: package.json
( \
npm install && \
npm prune && \
touch $@ \
) || touch $@ --reference $^ --date '1 day ago'
push: venv
venv/bin/markdown-to-presentation push \
.nojekyll README.md CNAME \
build assets node_modules *.html *.png *.svg favicon.ico \
all-hooks.json install-local.py
clean:
rm -rf venv build node_modules *.html all-hooks.json
build:
mkdir -p build
.PHONY: open
open: all
(which google-chrome && google-chrome index.html) || \
(which firefox && firefox index.html) &