Skip to content
Newer
Older
100644 59 lines (40 sloc) 1.02 KB
fb372f1 @reid Add Makefile.
reid authored
1 help:
2 @echo "Type \`make all\` first to get started."
3 @echo "\`make test\` for unit tests."
4 @echo "\`make lint\` to run JSLint."
5 @echo "\`make html\` to build HTML documentation."
6
7 all: install
8
9 install: sanity
10 npm i
11
12 sanity:
13 sh script/sanity.sh
14
15 test:
16 sh script/test.sh test/*.js
17
18 spec:
19 sh script/test.sh --spec test/*.js
20
21 smoke:
22 sh script/test.sh test/smoke/*.js
23
24 smoke-spec:
25 sh script/test.sh --spec test/smoke/*.js
26
27 lint:
28 # Problem? Try `make install-dev`
29 find lib test -name "*.js" -print0 | xargs -0 ./node_modules/.bin/jslint --forin
30
31 DOC:=doc
32 DOCS:=$(addprefix $(DOC)/, README.html HISTORY.html)
33
34 html: $(DOCS)
35
36 $(DOC):
37 mkdir $@
38
39 $(DOCS): | $(DOC)
40
41 RONN = ./node_modules/.bin/ronn
42
43 $(DOC)/README.html: README.md
44 # Problem? Try `make install`
45 $(RONN) -5 $< > $@
46
47 $(DOC)/HISTORY.html: HISTORY.md
48 # Problem? Try `make install`
49 $(RONN) -5 $< > $@
50
51 preview: $(DOCS)
52 sh script/open.sh $?
53 touch preview
54
55 clean:
56 rm -rf $(DOC) node_modules npm-*.log
57
58 .PHONY: help sanity install test spec lint smoke smoke-spec html preview clean
Something went wrong with that request. Please try again.