-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
47 lines (36 loc) · 781 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#
# Adds --harmony-generators flag when available/necessary
#
node ?= node
node_flags ?= $(shell $(node) --v8-options | grep generators | cut -d ' ' -f 3)
#
# Binaries.
#
mocha = $(node) $(node_flags) ./node_modules/.bin/_mocha
#
# Targets.
#
# Install dependencies with npm.
node_modules: package.json
@npm install
@touch node_modules # hack to fix mtime after npm installs
# Run the tests.
test: node_modules
@$(mocha)
# Run the tests in debugging mode.
test-debug: node_modules
@$(mocha) debug
# Run jshint against the project
lint-code: node_modules
node_modules/.bin/jshint lib/
lint-tests: node_modules
node_modules/.bin/jshint test/
lint: lint-code lint-tests
#
# Phonies.
#
.PHONY: test
.PHONY: test-debug
.PHONY: lint-code
.PHONY: lint-tests
.PHONY: lint