2014-05-20 17:43:03 +00:00
|
|
|
LIB=cfb
|
2013-11-26 15:56:58 +00:00
|
|
|
DEPS=$(wildcard bits/*.js)
|
2014-05-20 17:43:03 +00:00
|
|
|
TARGET=$(LIB).js
|
2013-11-26 15:56:58 +00:00
|
|
|
|
|
|
|
$(TARGET): $(DEPS)
|
|
|
|
cat $^ > $@
|
|
|
|
|
2014-05-20 17:43:03 +00:00
|
|
|
bits/31_version.js: package.json
|
|
|
|
echo "this.version = '"`grep version package.json | awk '{gsub(/[^0-9a-z\.-]/,"",$$2); print $$2}'`"';" > $@
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -rf $(TARGET) ./test_files/
|
|
|
|
|
|
|
|
.PHONY: init
|
|
|
|
init:
|
|
|
|
if [ ! -e test_files ]; then git clone https://github.com/SheetJS/test_files; fi
|
|
|
|
cd test_files; git pull; make
|
|
|
|
|
2013-11-26 15:56:58 +00:00
|
|
|
.PHONY: test mocha
|
2014-05-20 17:43:03 +00:00
|
|
|
test mocha: test.js
|
2013-10-26 20:20:19 +00:00
|
|
|
mocha -R spec
|
|
|
|
|
2013-11-26 15:56:58 +00:00
|
|
|
.PHONY: lint
|
2014-05-20 17:43:03 +00:00
|
|
|
lint: $(TARGET)
|
|
|
|
jshint --show-non-errors $(TARGET)
|
2013-10-27 20:13:02 +00:00
|
|
|
|
2014-05-20 17:43:03 +00:00
|
|
|
.PHONY: cov
|
|
|
|
cov: misc/coverage.html
|
2013-11-26 15:56:58 +00:00
|
|
|
|
2014-05-20 17:43:03 +00:00
|
|
|
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)"
|