carto/makefile

36 lines
704 B
Makefile
Raw Permalink Normal View History

#
# Run all tests
#
expresso = ./node_modules/.bin/mocha
docco = ./node_modules/.bin/docco
uglify = ./node_modules/.bin/uglify
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
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
dist: dist/carto.js
2013-07-31 18:43:09 +08:00
.PHONY: test