run full syntax check before running tests
[mkws-moved-to-github.git] / test / Makefile
1 # Copyright (c) 2013 IndexData ApS. http://indexdata.com
2
3 # For running on Mike's local install of node.js
4 MIKE = PATH=$$PATH:/usr/local/lib/node-v0.10.24-linux-x64/bin
5
6 all: check
7
8 clean:
9
10 distclean:
11         rm -rf node_modules
12
13 mkws-complete-syntax-check:
14         ${MAKE} -C../tools/htdocs $@
15
16 check: mkws-complete-syntax-check
17         for i in ./spec/*.js; do \
18           echo "$$i"; \
19           jasmine-node --noColor --captureExceptions --forceexit $$i; \
20         done
21
22 test: check
23
24 terse:
25         $(MIKE) jasmine-node --noColor --captureExceptions --forceexit spec
26
27 jsbeautifier jsb indent:
28         for i in ./spec/*.js ./js/*.js; do \
29           jsbeautifier -j $$i > $@.tmp && mv -f $@.tmp $$i; \
30         done
31
32 node-modules: node_modules
33 node_modules:
34         npm install jQuery xmlhttprequest jsdom request jasmine-node
35
36 help:
37         @echo "make [ all | check | clean | distclean ]"
38         @echo "     [ jsbeautifier | node-modules ]"