carto/Makefile

36 lines
704 B
Makefile
Raw Normal View History

2010-03-19 06:13:27 +08:00
#
# Run all tests
#
2011-01-26 06:37:55 +08:00
expresso = ./node_modules/.bin/mocha
2011-05-11 04:54:10 +08:00
docco = ./node_modules/.bin/docco
uglify = ./node_modules/.bin/uglify
2011-05-03 23:12:36 +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:32:55 +08:00
all: dist
2011-05-11 05:20:41 +08:00
lint:
./node_modules/.bin/jshint lib/carto/*.js lib/carto/tree/*.js
2011-01-26 06:37:55 +08:00
ifndef only
test:
@NODE_PATH=./lib:$NODE_PATH $(expresso) -R spec -I lib test/*.test.js
2011-01-26 06:37:55 +08:00
else
test:
@NODE_PATH=./lib:$NODE_PATH $(expresso) -R spec -I lib test/${only}.test.js
2011-01-26 06:37:55 +08:00
endif
2011-01-26 06:10:47 +08:00
check: test
doc:
2011-05-03 23:12:36 +08:00
$(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:32:55 +08:00
cat $(JS_CLIENT_FILES) > dist/carto.js
dist: dist/carto.js
2013-07-31 18:32:55 +08:00
2011-01-26 06:10:47 +08:00
.PHONY: test