1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
SOURCES = *.js
TESTS = test/*.test.js
# ==============================================================================
# Node Tests
# ==============================================================================
MOCHA = ./node_modules/.bin/mocha
test: test-node
test-node: node_modules
$(MOCHA) \
--reporter spec \
--require test/bootstrap/node $(TESTS)
node_modules:
npm install
# ==============================================================================
# Code Quality
# ==============================================================================
JSHINT = jshint
hint: lint
lint:
$(JSHINT) $(SOURCES)
# ==============================================================================
# Clean
# ==============================================================================
clean:
rm -rf build
clobber: clean
rm -rf node_modules
rm -rf components
rm -rf test/www/js/lib
.PHONY: test test-node hint lint clean clobber
|