forked from pugjs/pug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (32 loc) · 844 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
34
35
36
37
38
39
40
41
42
43
44
SRC = $(shell find lib -name "*.js" -type f)
UGLIFY = $(shell find node_modules -name "uglifyjs" -type f)
UGLIFY_FLAGS = --no-mangle
REPORTER = dot
all: jade.min.js runtime.min.js
test:
@./node_modules/.bin/mocha \
--reporter $(REPORTER)
test-cov: lib-cov
JADE_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html
lib-cov:
jscoverage lib lib-cov
benchmark:
@node support/benchmark
jade.js: $(SRC)
@node support/compile.js $^
jade.min.js: jade.js
@$(UGLIFY) $(UGLIFY_FLAGS) $< > $@ \
&& du jade.min.js \
&& du jade.js
runtime.js: lib/runtime.js
@cat support/head.js $< support/foot.js > $@
runtime.min.js: runtime.js
@$(UGLIFY) $(UGLIFY_FLAGS) $< > $@ \
&& du runtime.min.js \
&& du runtime.js
clean:
rm -f jade.js
rm -f jade.min.js
rm -f runtime.js
rm -f runtime.min.js
.PHONY: test-cov test benchmark clean