forked from google/ctfscoreboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (26 loc) · 835 Bytes
/
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
# Makefile to minimize JS using UglifyJS (https://github.com/mishoo/UglifyJS2)
# or 'cat' to just assemble into one file.
MIN_JS:=static/js/app.min.js
JS_SRC:=$(shell find static/js \! -name '*.min.*' -name '*.js')
MINIFY:=$(shell which uglifyjs >/dev/null && echo `which uglifyjs` || echo cat)
# Declarations for SCSS
SCSS_SRC:=$(shell find static/scss -name '*.scss')
PYSCSS:=$(shell which pyscss >/dev/null && echo `which pyscss` )
all: $(MIN_JS) scss
$(MIN_JS): $(JS_SRC)
$(MINIFY) $^ > $@
scss:
if [ "$(PYSCSS)" = "" ]; then\
echo "pyscss not found, exiting";\
exit -1;\
fi;\
for i in $$(ls static/scss/); do\
echo "Making $$i";\
$(PYSCSS) -o static/css/$${i%.scss}.css static/scss/$$i;\
done
tests:
python main.py runtests
coverage:
coverage run main.py runtests
coverage html
xdg-open htmlcov/index.html