sheetjs-clone/Makefile

65 lines
1.2 KiB
Makefile
Raw Normal View History

2017-03-12 07:34:36 +00:00
SHELL=/bin/bash
LIB=ssf
CMDS=bin/ssf.njs
HTMLLINT=
ULIB=$(shell echo $(LIB) | tr a-z A-Z)
TARGET=$(LIB).js
## Main Targets
.PHONY: ssf
ssf: ssf.md
voc ssf.md
2017-03-12 07:34:36 +00:00
## Testing
.PHONY: test mocha
test mocha: ## Run test suite
npm test
test_min:
MINTEST=1 npm test
2017-03-12 07:34:36 +00:00
## Code Checking
.PHONY: lint
2017-03-12 07:34:36 +00:00
lint: ## Run jshint and jscs checks
@jshint --show-non-errors $(TARGET) test/
@jshint --show-non-errors $(CMDS)
@jshint --show-non-errors package.json
@jshint --show-non-errors --extract=always $(HTMLLINT)
@jscs $(TARGET)
2017-03-12 07:34:36 +00:00
.PHONY: flow
flow: lint ## Run flow checker
@flow check --all --show-all-errors
.PHONY: cov
2017-03-12 07:34:36 +00:00
cov: tmp/coverage.html ## Run coverage test
.PHONY: cov_min
cov_min:
MINTEST=1 make cov
2017-03-12 07:34:36 +00:00
tmp/coverage.html: ssf
mocha --require blanket -R html-cov -t 20000 > $@
.PHONY: full_coveralls
full_coveralls:
mocha --require blanket --reporter mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js
2017-03-12 07:34:36 +00:00
.PHONY: coveralls
coveralls: ## Coverage Test + Send to coveralls.io
MINTEST=1 make full_coveralls
2017-03-12 07:34:36 +00:00
.PHONY: help
help:
@grep -hE '(^[a-zA-Z_-][ a-zA-Z_-]*:.*?|^#[#*])' $(MAKEFILE_LIST) | bash misc/help.sh
#* To show a spinner, append "-spin" to any target e.g. cov-spin
%-spin:
@make $* & bash misc/spin.sh $$!