Makefile 599 B

1234567891011121314151617181920212223242526272829303132
  1. BIN = ./node_modules/.bin
  2. MOCHA = $(BIN)/mocha
  3. ISTANBUL = $(BIN)/istanbul
  4. JSHINT = $(BIN)/jshint
  5. JSCS = $(BIN)/jscs
  6. .PHONY: test
  7. test:
  8. $(MOCHA) -u bdd -R spec --recursive
  9. .PHONY: validate
  10. validate: lint test
  11. .PHONY: clean
  12. clean:
  13. -rm -rf lib-cov
  14. -rm -rf html-report
  15. .PHONY: lib-cov
  16. lib-cov: clean
  17. $(ISTANBUL) instrument --output lib-cov --no-compact --variable global.__coverage__ lib
  18. .PHONY: coverage
  19. coverage: lib-cov
  20. VOW_QUEUE_COVERAGE=1 $(MOCHA) -u bdd --reporter mocha-istanbul
  21. @echo
  22. @echo Open html-report/index.html file in your browser
  23. .PHONY: lint
  24. lint:
  25. $(JSHINT) .
  26. $(JSCS) .