1 # Copyright (c) 2013 IndexData ApS. http://indexdata.com
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
6 PHANTOMJS= ./node_modules/phantomjs/bin/phantomjs
7 PHANTOMJS_URL= https://mkws-dev.indexdata.com/jasmine-popup.html
10 SCREENSHOT_WIDTH= 360 480 640 768 1024 1200 1440 2048
15 rm -f mkws-error.png mkws-error.html images/*.png
20 mkws-complete-syntax-check:
21 ${MAKE} -C../tools/htdocs $@
23 check: mkws-complete-syntax-check
24 @if [ ! -e node_modules ]; then echo "please run first: make node-modules"; exit 1; fi
25 jasmine-node --noColor --captureExceptions --forceexit ./spec
26 jasmine-node --noColor --captureExceptions --forceexit ./spec-sp
31 $(MIKE) jasmine-node --noColor --captureExceptions --forceexit spec
34 ${PHANTOMJS} phantom/evaluate.js ${PHANTOMJS_URL} ${PHANTOMJS_TIMEOUT}
37 ${PHANTOMJS} phantom/screenshot.js ${PHANTOMJS_URL} ${IMAGES}/screenshot.png 1200 1000
40 for i in ${SCREENSHOT_WIDTH}; do \
41 ${PHANTOMJS} phantom/screenshot.js http://mkws.indexdata.com ${IMAGES}/mkws-$$i $$i 2800 & \
44 for i in ${SCREENSHOT_WIDTH}; do \
45 ${PHANTOMJS} phantom/screenshot.js http://www.indexdata.com ${IMAGES}/indexdata-$$i $$i 1200 & \
48 jsbeautifier jsb indent:
49 for i in ./spec*/*.js ./js/*.js ./phantom/*.js; do \
50 jsbeautifier -j $$i > $@.tmp && mv -f $@.tmp $$i; \
53 node-modules: node_modules
55 npm install ${NPM_INSTALL_FLAGS} jQuery xmlhttprequest jsdom request jasmine-node phantomjs
58 @echo "make [ all | check | clean | distclean ]"
59 @echo " [ phantomjs | screenshot ]"
60 @echo " [ jsbeautifier | node-modules ]"