forked from benpickles/peity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (29 loc) · 1000 Bytes
/
Makefile
File metadata and controls
40 lines (29 loc) · 1000 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
36
37
38
39
40
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)
fixtures:
rm -f test/fixtures/*
node test/fixtures.js
release: test docs bower.json 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:
rm -f test/comparisons/*
rm -f test/images/*
./node_modules/.bin/mocha -R spec -t 30000 $(ARGS) ./test/index.js
.PHONY: clean fixtures release server test