-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (26 loc) · 862 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
BROWSERIFY := node_modules/.bin/browserify
PHANTOMJS := phantomjs
JS := node_modules/.bin/uglifyjs --compress --mangle --comments "/Free software under/"
JSLINT := node_modules/.bin/eslint --fix
TAP := node_modules/.bin/faucet
ISTANBUL := node_modules/.bin/istanbul
help:
echo "Try one of: clean, build, lint, test"
clean:
rm -f *.browser.js *.min.js *.min.js.map
rm -fr coverage
build: gettext-pythonic.min.js
lint:
$(JSLINT) gettext-pythonic.js
$(JSLINT) test.js
test: test.browser.js
$(ISTANBUL) cover --print none --report lcov -x test.js test.js |$(TAP)
$(ISTANBUL) report text-summary
$(PHANTOMJS) test.browser.js |$(TAP)
%.browser.js: %.js
$(BROWSERIFY) -s gettext $< -o $@
%.min.js: %.browser.js
$(JS) --source-map [email protected] -o $@ -- $<
.PHONY: help clean build lint test
.SILENT: help test
.PRECIOUS: %.browser.js