forked from twilio/BankersBox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (29 loc) · 994 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
all: min
clean:
rm -rf src-tmp
rm -rf src-min-tmp
rm -rf src-cov
rm -f bankersbox.min.js
bankersbox.min.js: bankersbox.js
@echo "Sending to Google Closure compiler..."
@curl -vvv -d output_format=text -d output_info=compiled_code -d compilation_level=SIMPLE_OPTIMIZATIONS --data-urlencode js_code@bankersbox.js http://closure-compiler.appspot.com/compile > bankersbox.min.js 2> /dev/null
@echo "Done."
min: bankersbox.min.js
test:
@echo "Testing bankersbox.js:"
@NODE_PATH=`pwd` expresso -s tests/*
testmin: min
@mkdir -p src-min-tmp
@rm -f src-min-tmp/bankersbox.js
@ln -s ../bankersbox.min.js src-min-tmp/bankersbox.js
@echo "Testing MINIFIED file:"
@NODE_PATH=`pwd`/src-min-tmp expresso -s tests/*
testall: test testmin
coverage:
mkdir -p src-tmp
rm -f src-tmp/bankersbox.js
ln -s ../bankersbox.js src-tmp/bankersbox.js
rm -rf src-cov
node-jscoverage src-tmp src-cov
NODE_PATH=`pwd`/src-cov expresso -s tests/*
.PHONY: all clean min test testmin testall coverage