-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (23 loc) · 811 Bytes
/
Makefile
File metadata and controls
35 lines (23 loc) · 811 Bytes
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
34
35
SOURCES = $(wildcard lib/*.js)
VERSION = $(shell node -e "console.log(JSON.parse(require('fs').readFileSync('./package.json')).version)")
default: spec
lint:
./node_modules/.bin/jshint $(SOURCES) --config ./jshint.json
spec: lint spec_node spec_browser
spec_node:
./node_modules/.bin/jasmine
spec_browser:
./node_modules/karma/bin/karma start ./karma.config.js
dist/statechart.js: $(SOURCES)
./node_modules/.bin/webpack --output-file $@
dist/statechart.min.js: $(SOURCES)
./node_modules/.bin/webpack -p --output-file $@
package: dist/statechart.js dist/statechart.min.js
release:
@echo Releasing $(VERSION)...
npm publish
git tag -a v$(VERSION) -m '$(VERSION) release'
git push origin v$(VERSION)
clean:
rm -rf ./dist
.PHONY: default clean lint spec spec_node spec_browser package release