/
Makefile
54 lines (45 loc) · 879 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
48
49
50
51
52
53
54
#!/usr/bin/make
# The first command listed is the default
.PHONY: default
default: clean install;
.PHONY: install
install:
# Install Node.js Modules
npm install;
.PHONY: clean
clean:
# Remove Temporary Files
rm -rf ./node_modules/;
rm -rf ./coverage/;
.PHONY: test
test: delint coverage;
.PHONY: delint
delint:
# Delint with JSHint
./node_modules/jshint/bin/jshint \
app/ \
test/ \
server.js;
.PHONY: integration
integration:
# Run Mocha Tests
./node_modules/mocha/bin/mocha \
--recursive \
-R spec \
test/;
.PHONY: coverage
coverage:
# Code Coverage Check
./node_modules/istanbul/lib/cli.js cover \
./node_modules/mocha/bin/_mocha -- \
--recursive \
-R spec \
test/;
.PHONY: report
report:
# Open Code Coverage Report in Browser (OS X)
open ./coverage/lcov-report/index.html;
.PHONY: start
start:
# Start HTTP Server
node ./server.js;