cylon/Makefile

29 lines
705 B
Makefile
Raw Normal View History

2014-02-27 22:44:53 +08:00
BIN := ./node_modules/.bin
FILES := $(shell find lib spec/lib examples -type f -name "*.js")
TEST_FILES := spec/helper.js $(shell find spec/lib -type f -name "*.js")
2014-02-27 22:44:53 +08:00
VERSION := $(shell node -e "console.log(require('./package.json').version)")
.PHONY: cover test bdd lint ci release
2014-05-22 10:35:09 +08:00
2014-12-16 05:17:12 +08:00
test: lint
2014-10-21 05:38:41 +08:00
@$(BIN)/mocha --colors -R dot $(TEST_FILES)
2014-02-27 22:44:53 +08:00
2014-12-16 05:17:12 +08:00
bdd: lint
@$(BIN)/mocha --colors -R spec $(TEST_FILES)
2014-02-27 22:44:53 +08:00
cover:
@istanbul cover $(BIN)/_mocha $(TEST_FILES) --report lcovonly -- -R spec
2014-02-27 22:44:53 +08:00
lint:
@jshint $(FILES)
ci: lint cover
release:
@git push origin master
@git checkout release ; git merge master ; git push ; git checkout master
@git tag -m "$(VERSION)" v$(VERSION)
@git push --tags
@npm publish ./