2013-07-30 16:45:35 +08:00
|
|
|
|
|
|
|
UGLIFYJS=./node_modules/.bin/uglifyjs
|
2014-12-10 01:45:26 +08:00
|
|
|
BROWSERIFY=./node_modules/browserify/bin/cmd.js
|
2013-07-30 16:45:35 +08:00
|
|
|
|
|
|
|
JS_CLIENT_FILES= lib/torque/*.js \
|
|
|
|
lib/torque/renderer/*.js \
|
|
|
|
lib/torque/gmaps/*.js \
|
2013-08-29 21:21:39 +08:00
|
|
|
lib/torque/leaflet/leaflet_tileloader_mixin.js \
|
|
|
|
lib/torque/leaflet/canvas_layer.js \
|
|
|
|
lib/torque/leaflet/torque.js
|
2013-07-30 16:45:35 +08:00
|
|
|
|
2015-04-20 20:59:41 +08:00
|
|
|
all: dist/torque.js dist/torque.full.js
|
2014-05-22 23:24:19 +08:00
|
|
|
|
2015-01-14 20:57:51 +08:00
|
|
|
dist/torque.full.uncompressed.js: dist_folder dist/torque.uncompressed.js
|
|
|
|
$(BROWSERIFY) lib/torque/index.js --standalone torque > dist/torque.full.uncompressed.js
|
|
|
|
|
2015-04-20 20:59:41 +08:00
|
|
|
dist/torque.full.js: dist_folder dist/torque.full.uncompressed.js
|
|
|
|
$(UGLIFYJS) dist/torque.full.uncompressed.js > dist/torque.full.js
|
|
|
|
|
|
|
|
dist/torque.uncompressed.js: dist_folder $(JS_CLIENT_FILES)
|
|
|
|
$(BROWSERIFY) lib/torque/index.js --no-bundle-external --standalone torque > dist/torque.uncompressed.js
|
|
|
|
|
|
|
|
dist/torque.js: dist_folder dist/torque.uncompressed.js
|
|
|
|
$(UGLIFYJS) dist/torque.uncompressed.js > dist/torque.js
|
|
|
|
|
2013-07-30 16:45:35 +08:00
|
|
|
dist_folder:
|
|
|
|
mkdir -p dist
|
|
|
|
|
|
|
|
dist: dist_folder dist/torque.js
|
|
|
|
|
2015-03-05 00:24:37 +08:00
|
|
|
clean-results:
|
|
|
|
-@rm test/results/*.png
|
|
|
|
|
2014-12-09 22:46:03 +08:00
|
|
|
prepare-test-suite:
|
|
|
|
browserify test/suite.js > test/suite-bundle.js
|
|
|
|
|
2015-03-05 00:24:37 +08:00
|
|
|
test: prepare-test-suite
|
|
|
|
@echo "***tests***"
|
|
|
|
./node_modules/node-qunit-phantomjs/bin/node-qunit-phantomjs test/suite.html
|
|
|
|
|
|
|
|
test-acceptance: clean-results
|
2015-03-05 00:23:08 +08:00
|
|
|
@echo "***acceptance***"
|
|
|
|
./node_modules/.bin/qunit -c lib/torque/ -t `find test/acceptance/ -name *.js`
|
|
|
|
|
2015-03-05 00:24:37 +08:00
|
|
|
test-all: test test-acceptance
|
|
|
|
|
2013-07-30 16:45:35 +08:00
|
|
|
clean:
|
|
|
|
rm -rf dist
|
|
|
|
|
|
|
|
.PHONY: clean dist_folder
|