1 # Copyright (c) 2013-2014 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
7 JASMINE_NODE= ./node_modules/jasmine-node/bin/jasmine-node
8 PHANTOMJS= ./bomb.pl ./node_modules/phantomjs/bin/phantomjs
9 PHANTOMJS_URL= https://mkws-dev.indexdata.com/jasmine-popup.html
12 SCREENSHOT_WIDTH= 360 480 640 768 1024 1200 1440 2048
17 rm -f mkws-error.png mkws-error.html images/*.png
22 mkws-complete-syntax-check:
23 ${MAKE} -C../tools/htdocs $@
25 check: mkws-complete-syntax-check
26 @if [ ! -e node_modules ]; then echo "please run first: make node-modules"; exit 1; fi
27 ${JASMINE_NODE} --noColor --captureExceptions --forceexit ./spec
32 $(MIKE) jasmine-node --noColor --captureExceptions --forceexit spec
35 ${PHANTOMJS} phantom/evaluate.js ${PHANTOMJS_URL} ${PHANTOMJS_TIMEOUT}
38 ${PHANTOMJS} phantom/screenshot.js ${PHANTOMJS_URL} ${IMAGES}/screenshot.png 1200 1000
41 for i in ${SCREENSHOT_WIDTH}; do \
42 ${PHANTOMJS} phantom/screenshot.js http://mkws.indexdata.com ${IMAGES}/mkws-$$i.png $$i 1000 & \
47 for i in ${SCREENSHOT_WIDTH}; do \
48 ${PHANTOMJS} phantom/screenshot.js http://www.indexdata.com ${IMAGES}/indexdata-$$i.png $$i 1000 & \
52 jsbeautifier jsb indent:
53 for i in package.json ./spec*/*.js ./js/*.js ./phantom/*.js; do \
54 jsbeautifier -j $$i > $@.tmp && mv -f $@.tmp $$i; \
57 node_modules node-modules:
58 npm install ${NPM_INSTALL_FLAGS}
61 @echo "make [ all | check | clean | distclean ]"
62 @echo " [ phantomjs | screenshot ]"
63 @echo " [ jsbeautifier | node-modules ]"
65 @echo "DEBUG=1 make phantomjs PHANTOMJS_TIMEOUT=8 PHANTOM_URL=https://mkws-dev.indexdata.com/jasmine-popup.html"