niViz

niViz Git Source Tree

Root/makefile

1
2NBIN = ./node_modules/.bin
3
4ASSETS = application.js niviz.js application.css \
5 jquery.js moment.js snap.svg.js
6
7# --- Development ---
8
9server :
10@DEBUG=niviz:* node server.js
11
12# --- Distribution ---
13
14build : clean
15@DEBUG=niviz:build NODE_ENV=development node build.js ${ASSETS}
16
17dist : clean
18@DEBUG=niviz:build ${NBIN}/yuidoc -q .
19@DEBUG=niviz:build node build.js ${ASSETS}
20@DEBUG=niviz:build cp -r assets/resources ./dist/resources
21rm -f dist/assets/jquery*
22rm -f dist/assets/moment*
23rm -f dist/assets/snap.svg*
24rm -f dist/assets/niviz*
25rm -f dist/assets/*.map* dist/assets/*.gz
26@DEBUG=niviz:build ${NBIN}/webpack
27@DEBUG=niviz:build cp -r assets/img dist/img
28@DEBUG=niviz:build cp -r doc dist/doc
29
30debug: clean
31@DEBUG=niviz:build node build.js ${ASSETS}
32
33# --- Documentation ---
34
35doc :
36@${NBIN}/yuidoc .
37
38# --- Testing ---
39
40lint :
41@${NBIN}/eslint server.js build.js convert.js \
42ui/javascripts/*.js test/ui/*.js \
43lib/*.js lib/parsers/*.js lib/values/*.js lib/graphs/*.js \
44 test/lib/*.js test/lib/parsers/*.js test/lib/values/*.js \
45test/fixtures/*.js
46
47test : lint
48@./node_modules/karma/bin/karma start test/karma.opts
49
50watch :
51@./node_modules/karma/bin/karma start test/karma.opts --no-single-run --browsers
52
53test-node : lint
54@${NBIN}/mocha test/lib/*.js test/lib/parsers/*.js
55
56debug-node :
57@${NBIN}/mocha debug test/lib/*.js test/lib/parsers/*.js
58
59coverage :
60@./node_modules/karma/bin/karma start test/karma.opts \
61--reporters dots,coverage \
62--single-run
63
64
65# --- Dependency Management ---
66
67# Install/update all third-party dependencies
68dep : npm bower
69
70
71npm :
72@npm install
73@[ $$? -ne 0 ] || echo -e "\e[0;32mNode.js installed modules to node_modules\e[0m"
74
75bower :
76@${NBIN}/bower install
77@[ $$? -ne 0 ] || echo -e "\e[0;32mBower components installed to .bower\e[0m"
78
79update :
80@npm update
81@${NBIN}/bower update
82
83# --- Housekeeping ---
84
85clean :
86@rm -rf ./dist
87
88purge : clean
89rm -rf ./coverage
90rm -rf ./doc
91rm -rf ./node_modules
92rm -rf ./.bower
93
94
95.PHONY: clean purge npm bower test test-node debug-node \
96doc coverage dist jade mince server

Archive Download this file

Branches