diff --git a/.gitignore b/.gitignore index 357a77091c..bd6608341b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store node_modules +test/tmp *.log *.cache /templates.json diff --git a/Makefile b/Makefile index 636a84fca2..1846e91f5b 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,15 @@ MOCHA_CMD = node_modules/mocha/bin/_mocha export NODE_ENV = test -.PHONY: clean test test-cov test-travis publish bench +.PHONY: clean test test-cov test-travis publish bench build clean: - rm -rf coverage templates.json + rm -rf coverage templates.json test/tmp test: + make clean $(MOCHA_CMD) + rm -rf test/tmp bench: node node_modules/matcha/bin/_matcha @@ -17,13 +19,26 @@ bench: test-cov: make clean node $(ISTANBUL_CMD) $(MOCHA_CMD) -- + rm -rf test/tmp test-travis: node $(ISTANBUL_CMD) $(MOCHA_CMD) --report lcovonly -- --reporter spec if test -n "$$CODECLIMATE_REPO_TOKEN"; then codeclimate < coverage/lcov.info; fi +build: + # build for the browser + publish: make clean + + rm -rf node_modules + npm install + node bin/cache-templates + make test + npm publish + + # todo - auto-create tag + make clean