UNPKG

999 BPlain TextView Raw
1all:
2 @npm install -d
3 @cp scripts/githooks/* .git/hooks/
4 @chmod -R +x .git/hooks/
5
6
7specs := $(shell find ./tests -name '*.test.js' ! -path "*node_modules/*")
8reporter = spec
9test:
10 @node_modules/.bin/mocha --reporter ${reporter} ${specs}
11
12
13files := $(shell find . -name '*.js' ! -path "*node_modules/*")
14lint:
15 @node_modules/.bin/jshint ${files}
16
17out = tests/coverage.html
18coverage:
19 # NOTE: You must have node-jscoverage installed:
20 # https://github.com/visionmedia/node-jscoverage
21 # The jscoverage npm module and original JSCoverage packages will not work
22 @jscoverage lib lib-cov
23 @SWIG_COVERAGE=1 $(MAKE) test reporter=html-cov > ${out}
24 @rm -rd lib-cov
25 @echo
26 @echo "Built Report to ${out}"
27 @echo
28
29theme = $(HOME)/.spm/themes/one
30documentation:
31 @cp README.md _docs/index.md
32 @nico build --theme=${theme}
33
34publish: clean documentation
35 @ghp-import _site -p
36
37clean:
38 @rm -fr _site
39
40server:
41 @cp README.md _docs/index.md
42 @nico server --theme=${theme}
43
44.PHONY: all build test lint coverage