xsheetjs/Makefile

49 lines
926 B
Makefile
Raw Normal View History

DEPS=$(wildcard bits/*.js)
TARGET=xlsx.js
FMT=xlsx xlsm xlsb
$(TARGET): $(DEPS)
cat $^ > $@
bits/31_version.js: package.json
echo "XLSX.version = '"`grep version package.json | awk '{gsub(/[^0-9\.]/,"",$$2); print $$2}'`"';" > $@
.PHONY: clean
clean:
2014-01-15 13:58:55 +00:00
rm $(TARGET)
.PHONY: init
init:
git submodule init
git submodule update
2014-01-15 13:58:55 +00:00
git submodule foreach git pull origin master
git submodule foreach make
.PHONY: test mocha
test mocha:
mocha -R spec
TESTFMT=$(patsubst %,test_%,$(FMT))
.PHONY: $(TESTFMT)
$(TESTFMT): test_%:
FMTS=$* make test
.PHONY: jasmine
jasmine:
npm run-script test-jasmine
2013-05-18 00:12:10 +00:00
.PHONY: lint
lint: $(TARGET)
jshint --show-non-errors $(TARGET)
.PHONY: cov
cov: misc/coverage.html
misc/coverage.html: xlsx.js
mocha --require blanket -R html-cov > misc/coverage.html
.PHONY: coveralls
coveralls:
mocha --require blanket --reporter mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js