-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (26 loc) · 853 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.PHONY: build run test lint publish doc \
test-unittest demo
build: node_modules/.build-sentinel
node_modules/.build-sentinel: package.json
npm update
touch node_modules/.build-sentinel
demo: run
run: build
node examples/bench-01.js
test: build test-unittest lint
test-unittest:
node node_modules/mocha/bin/mocha -c test/unittest.js
lint:
node node_modules/eslint/bin/eslint.js --no-color index.js examples/
# NOTE: `npm version` automatically creates a git commit and git tag for the
# incremented version
publish: build test doc
@if [ $(shell git symbolic-ref --short -q HEAD) = "master" ]; then exit 0; else \
echo "Current git branch does not appear to be 'master'. Refusing to publish."; exit 1; \
fi
npm version patch
git push
git push --tags
npm publish
doc:
node node_modules/esdoc/out/src/ESDocCLI.js -c esdoc.config.json