new target phantomjs
[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 NPM_INSTALL_FLAGS=-q
6 PHANTOMJS=      ./node_modules/phantomjs/bin/phantomjs
7
8 all: check
9
10 clean:
11
12 distclean:
13         rm -rf node_modules
14
15 mkws-complete-syntax-check:
16         ${MAKE} -C../tools/htdocs $@
17
18 check: mkws-complete-syntax-check
19         jasmine-node --noColor --captureExceptions --forceexit ./spec
20         jasmine-node --noColor --captureExceptions --forceexit ./spec-sp
21
22 test: check
23
24 terse:
25         $(MIKE) jasmine-node --noColor --captureExceptions --forceexit spec
26
27 phantomjs:
28         @# ${PHANTOMJS} phantom/evaluate.js https://mkws-dev.indexdata.com/jasmine-local-popup.html     
29         ${PHANTOMJS} phantom/evaluate.js https://mkws-dev.indexdata.com/jasmine-popup.html      
30
31 jsbeautifier jsb indent:
32         for i in ./spec*/*.js ./js/*.js; do \
33           jsbeautifier -j $$i > $@.tmp && mv -f $@.tmp $$i; \
34         done
35
36 node-modules: node_modules
37 node_modules:
38         npm install ${NPM_INSTALL_FLAGS} jQuery xmlhttprequest jsdom request jasmine-node phantomjs
39
40 help:
41         @echo "make [ all | check | phantomjs | clean | distclean ]"
42         @echo "     [ jsbeautifier | node-modules ]"