1 | #
|
2 | # Vars
|
3 | #
|
4 |
|
5 | BIN = ./node_modules/.bin
|
6 | .DEFAULT_GOAL := all
|
7 |
|
8 | src = $(shell find src/*.js)
|
9 | tests = $(shell find test/*.js)
|
10 |
|
11 | #
|
12 | # Tasks
|
13 | #
|
14 |
|
15 | node_modules: package.json
|
16 | @npm install
|
17 | @touch node_modules
|
18 |
|
19 | test: $(src) $(tests)
|
20 | @NODE_ENV=development hihat test/index.js -- \
|
21 | --debug \
|
22 | -t babelify \
|
23 | -t envify \
|
24 | -p tap-dev-tool
|
25 |
|
26 | validate: node_modules
|
27 | @${BIN}/standard
|
28 |
|
29 | all: validate test
|
30 |
|
31 | #
|
32 | # Phony
|
33 | #
|
34 |
|
35 | .PHONY: test validate
|