UNPKG

803 BPlain TextView Raw
1
2TESTS = test/*.js
3SRC = $(shell find lib -name "*.js" -type f)
4UGLIFY_FLAGS = --no-mangle
5
6all: jade.min.js runtime.min.js
7
8test:
9 @./node_modules/.bin/expresso \
10 -I node_modules \
11 $(TESTS)
12
13benchmark:
14 @node benchmarks/jade.js \
15 && node benchmarks/jade-self.js \
16 && node benchmarks/haml.js \
17 && node benchmarks/haml2.js \
18 && node benchmarks/ejs.js
19
20jade.js: $(SRC)
21 @node support/compile.js $^
22
23jade.min.js: jade.js
24 @uglifyjs $(UGLIFY_FLAGS) $< > $@ \
25 && du jade.min.js \
26 && du jade.js
27
28runtime.js: lib/runtime.js
29 @cat support/head.js $< support/foot.js > $@
30
31runtime.min.js: runtime.js
32 @uglifyjs $(UGLIFY_FLAGS) $< > $@ \
33 && du runtime.min.js \
34 && du runtime.js
35
36clean:
37 rm -f jade.js
38 rm -f jade.min.js
39 rm -f runtime.js
40 rm -f runtime.min.js
41
42.PHONY: test benchmark clean