1 | all:
|
2 | @npm install -d
|
3 | @cp scripts/githooks/* .git/hooks/
|
4 | @chmod -R +x .git/hooks/
|
5 |
|
6 |
|
7 | specs := $(shell find ./tests -name '*.test.js' ! -path "*node_modules/*")
|
8 | reporter = spec
|
9 | test:
|
10 | @node_modules/.bin/mocha --reporter ${reporter} ${specs}
|
11 |
|
12 |
|
13 | files := $(shell find . -name '*.js' ! -path "*node_modules/*")
|
14 | lint:
|
15 | @node_modules/.bin/jshint ${files}
|
16 |
|
17 | out = tests/coverage.html
|
18 | coverage:
|
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 |
|
29 | theme = $(HOME)/.spm/themes/one
|
30 | documentation:
|
31 | @cp README.md _docs/index.md
|
32 | @nico build --theme=${theme}
|
33 |
|
34 | publish: clean documentation
|
35 | @ghp-import _site -p
|
36 |
|
37 | clean:
|
38 | @rm -fr _site
|
39 |
|
40 | server:
|
41 | @cp README.md _docs/index.md
|
42 | @nico server --theme=${theme}
|
43 |
|
44 | .PHONY: all build test lint coverage
|