Makefile 538 B

12345678910111213141516171819202122232425262728
  1. BIN := node_modules/.bin
  2. NODE ?= node
  3. SRC = $(wildcard *.js)
  4. TEST = $(wildcard test/*.js)
  5. test: NODE=$(BIN)/gnode
  6. test: node_modules
  7. $(NODE) $(BIN)/_mocha \
  8. --reporter spec \
  9. --require co-mocha \
  10. $(NODE_FLAGS)
  11. # coverage only available on 0.11
  12. coverage: node_modules $(SRC) $(TEST)
  13. $(NODE) --harmony-generators $(BIN)/istanbul cover \
  14. $(BIN)/_mocha -- \
  15. --require co-mocha \
  16. --reporter spec
  17. node_modules: package.json
  18. @npm install
  19. @touch $@
  20. clean:
  21. @rm -rf coverage test/fixtures/*copy*
  22. .PHONY: test clean