sheetjs/Makefile
SheetJS 5c4b5827b5 version bump 0.5.9: sheetRows partial processing
- opts.sheetRows limits parsing; default (0) parses all rows
- added -n mode to xlsx2csv to control number of rows
- !ref will be adjusted; !fullref holds full range
2014-02-18 22:03:28 -05:00

56 lines
1.1 KiB
Makefile

LIB=xlsx
DEPS=$(wildcard bits/*.js)
TARGET=$(LIB).js
FMT=xlsx xlsm xlsb misc
$(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:
rm $(TARGET)
.PHONY: init
init:
git submodule init
git submodule update
git submodule foreach git pull origin master
git submodule foreach make
.PHONY: test mocha
test mocha: test.js
mocha -R spec
TESTFMT=$(patsubst %,test_%,$(FMT))
.PHONY: $(TESTFMT)
$(TESTFMT): test_%:
FMTS=$* make test
.PHONY: jasmine
jasmine:
npm run-script test-jasmine
.PHONY: lint
lint: $(TARGET)
jshint --show-non-errors $(TARGET)
.PHONY: cov
cov: misc/coverage.html
misc/coverage.html: $(TARGET) test.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
.PHONY: dist
dist: $(TARGET)
cp $(TARGET) dist/
cp LICENSE dist/
uglifyjs $(TARGET) -o dist/$(LIB).min.js --source-map dist/$(LIB).min.map --preamble "$$(head -n 1 bits/00_header.js)"