Makefile
################################################################################# executables################################################################################ NPM_CHECK=node_modules/.bin/npm-checkMVERSION=node_modules/.bin/mversionMOCHA=node_modules/.bin//mocha_MOCHA=node_modules/.bin//_mochaCOVERALLS=node_modules/.bin/coverallsISTANBUL=node_modules/.bin/istanbulSPACEJAM=node_modules/.bin/spacejamCODECLIMATE=node_modules/.bin/codeclimate ################################################################################# variables################################################################################ VERSION=`egrep -o '[0-9\.]{3,}' package.json -m 1` ################################################################################# setup everything for development################################################################################ setup: @npm install ################################################################################# nodejs tests################################################################################ # test code in nodejstest: @$(MOCHA) # test code in nodejs, and generates coveragetest.coverage: @$(ISTANBUL) cover $(_MOCHA) # test code in nodejs, generates coverage and startup a simple servertest.coverage.preview: test.coverage @cd coverage/lcov-report && python -m SimpleHTTPServer 8080 # test code in nodejs, generates coverage and send it to coverallstest.coverage.coveralls: test.coverage @$(CODECLIMATE) < coverage/lcov.info @cat coverage/lcov.info | $(COVERALLS) ################################################################################# meteor tests################################################################################ # run tests and show output in browsertest.meteor: meteor test-packages ./ # run tests and show output in terminaltest.meteor.headless: @$(SPACEJAM) test-packages ./ ################################################################################# more tests################################################################################ test.all: test test.meteor.headless ################################################################################# manages version bumps################################################################################ bump.minor: @$(MVERSION) minor bump.major: @$(MVERSION) major bump.patch: @$(MVERSION) patch ################################################################################# checking / updating dependencies################################################################################ deps.check: @$(NPM_CHECK) deps.upgrade: @$(NPM_CHECK) -u ################################################################################# publish / re-publish################################################################################ publish: git tag -a $(VERSION) -m "Releasing $(VERSION)" git push origin master --tags npm publish meteor publish re-publish: git tag -a $(VERSION) -m "Releasing $(VERSION)" -f git push origin master -f --tags npm publish -f meteor publish --update ################################################################################# OTHERS################################################################################ .PHONY: test