2010-03-19 02:35:56 +08:00
|
|
|
#
|
|
|
|
# Run all tests
|
|
|
|
#
|
|
|
|
|
|
|
|
expresso = ./node_modules/.bin/mocha
|
|
|
|
docco = ./node_modules/.bin/docco
|
2011-06-15 01:59:20 +08:00
|
|
|
uglify = ./node_modules/.bin/uglify
|
2010-03-19 02:35:56 +08:00
|
|
|
|
2013-07-29 18:42:41 +08:00
|
|
|
JS_CLIENT_FILES=browser/*.js lib/carto/parser.js lib/carto/tree.js lib/carto/tree/*.js lib/carto/functions.js lib/carto/renderer_js.js
|
|
|
|
|
2013-07-31 18:43:09 +08:00
|
|
|
all: dist
|
|
|
|
|
2010-03-19 02:35:56 +08:00
|
|
|
lint:
|
|
|
|
./node_modules/.bin/jshint lib/carto/*.js lib/carto/tree/*.js
|
|
|
|
|
|
|
|
ifndef only
|
|
|
|
test:
|
|
|
|
@NODE_PATH=./lib:$NODE_PATH $(expresso) -R spec -I lib test/*.test.js
|
|
|
|
else
|
|
|
|
test:
|
|
|
|
@NODE_PATH=./lib:$NODE_PATH $(expresso) -R spec -I lib test/${only}.test.js
|
|
|
|
endif
|
|
|
|
|
|
|
|
check: test
|
|
|
|
|
|
|
|
doc:
|
|
|
|
$(docco) lib/carto/*.js lib/carto/tree/*.js
|
|
|
|
|
2013-07-29 18:42:41 +08:00
|
|
|
dist/carto.js: $(JS_CLIENT_FILES)
|
2013-07-31 18:43:09 +08:00
|
|
|
cat $(JS_CLIENT_FILES) > dist/carto.js
|
2011-06-15 01:59:20 +08:00
|
|
|
|
|
|
|
dist: dist/carto.js
|
|
|
|
|
2013-07-31 18:43:09 +08:00
|
|
|
|
2010-03-19 02:35:56 +08:00
|
|
|
.PHONY: test
|