1 | BUNYAN_LEVEL?=1000
|
2 | SHELL = /bin/bash -o pipefail
|
3 |
|
4 | all: install test
|
5 |
|
6 | check: install
|
7 | ./node_modules/.bin/eslint src/
|
8 | ./node_modules/.bin/coffeelint -q src tests
|
9 |
|
10 | test: check
|
11 | ./node_modules/.bin/mocha -b --recursive --compilers coffee:coffee-script/register tests | ./node_modules/.bin/bunyan -l ${BUNYAN_LEVEL}
|
12 |
|
13 | coverage: test
|
14 | @mkdir -p doc
|
15 | ./node_modules/.bin/istanbul cover --dir doc ./node_modules/.bin/_mocha -- --recursive --compilers coffee:coffee-script/register tests
|
16 | @echo "coverage exported to doc/lcov-report/index.html"
|
17 |
|
18 | run: check
|
19 | node index.js | ./node_modules/.bin/bunyan -l ${BUNYAN_LEVEL}
|
20 |
|
21 | install: node_modules
|
22 |
|
23 | node_modules: package.json
|
24 | npm install
|
25 | @touch node_modules
|
26 |
|
27 | clean:
|
28 | rm -fr node_modules
|