.PHONY: all clean install clean-install clean-test force-install test lint lint-tests docs docs/tests docs/api NPM_BIN:=$(shell npm bin) TEST_CMD:=NODE_PATH="`pwd`:$(NODE_PATH)" $(NPM_BIN)/mocha TEST_RESULTS_ROOT:=test/results LINT_CMD:=$(NPM_BIN)/jshint all: install lint lint-tests test clean: clean-test clean-install install: npm install clean-install: rm -rf node_modules clean-test: rm -rf $(TEST_RESULTS_ROOT) *.log force-install: clean-install install test-%: mkdir -p $(TEST_RESULTS_ROOT) $(TEST_CMD) test/specs/$(subst test-,,$@) | tee $(TEST_RESULTS_ROOT)/$@.log test: lint lint-tests test-jsApi test-service lint: $(LINT_CMD) index.js src/api lint-tests: $(LINT_CMD) test docs/tests: rm -rf $@; mkdir -p $@ cp src/docs/test/docGen.css $@ $(TEST_CMD) --reporter src/docs/test/docGen test/specs | cat src/docs/test/docGen-pre.html - src/docs/test/docGen-post.html > $@/index.html docs/api: rm -rf $@; mkdir -p $@ @echo Coming soon docs: docs/tests docs/api