forked from jeromegn/Backbone.localStorage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (22 loc) · 832 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
bin = ./node_modules/.bin
test: test-globals-amd test-commonjs
test-globals-amd:
$(bin)/mocha-phantomjs ./spec/runner.html
test-commonjs: install ./spec/localStorage_commonjs_spec.bundled.js
$(bin)/mocha-phantomjs ./spec/runner_commonjs.html
link install:
@npm $@
clean:
rm -rf node_modules ./spec/localStorage_commonjs_spec.bundled.js
./spec/localStorage_commonjs_spec.bundled.js: ./spec/localStorage_commonjs_spec.js
$(bin)/browserify -e $< -o $@
minify:
$(bin)/uglifyjs -o backbone.localStorage-min.js backbone.localStorage.js
# Get version number from package.json, need this for tagging.
version = $(shell node -e "console.log(JSON.parse(require('fs').readFileSync('package.json')).version)")
# npm publish, public-docs and tag
publish :
npm publish
git push
git tag v$(version)
git push --tags origin master