-
Notifications
You must be signed in to change notification settings - Fork 399
/
Makefile
34 lines (24 loc) · 818 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
34
UGLIFY=./node_modules/.bin/uglifyjs --compress --mangle --
VERSION = $(shell head -1 jquery.peity.js | awk '{print $$(NF)}')
first: test
%.json: jquery.peity.js
sed -i '' 's/\"version":.*,/"version": "$(VERSION)",/' $@
jquery.peity.min.js: jquery.peity.js
head -6 $< > $@
$(UGLIFY) $< >> $@
jquery.peity.min.js.gz: jquery.peity.min.js
gzip -9f < $< > $@
clean:
rm jquery.peity.min.js*
docs: jquery.peity.min.js.gz
bin/update_docs $(VERSION)
release: test docs package.json
@printf '\e[0;32m%-6s\e[m\n' "Happy days, everything passes. Make sure CHANGELOG.md is already up-to-date, commit everything, and tag it:"
@echo ' $$ git commit -m "Version $(VERSION)."'
@echo ' $$ git tag v$(VERSION)'
@echo ' $$ npm publish'
server:
node test/server.js
test:
npm test
.PHONY: clean release server test