-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (32 loc) · 1.56 KB
/
Makefile
File metadata and controls
41 lines (32 loc) · 1.56 KB
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
41
# makefile to automatize simple operations
server:
python -m SimpleHTTPServer
deploy:
# assume there is something to commit
# use "git diff --exit-code HEAD" to know if there is something to commit
# so two lines: one if no commit, one if something to commit
git commit -a -m "New deploy" && git push -f origin HEAD:gh-pages && git reset HEAD~
build: buildCore buildBundle
buildCore:
echo > build/augmentedgesture.js
cat src/augmentedgesture.js >> build/augmentedgesture.js
buildBundle:
echo > build/augmentedgesture-bundle.js
cat build/augmentedgesture.js >> build/augmentedgesture-bundle.js
cat vendor/imageprocessing.js >> build/augmentedgesture-bundle.js
cat vendor/requestanimationframe.js >> build/augmentedgesture-bundle.js
cat vendor/dat.gui/dat.gui.js >> build/augmentedgesture-bundle.js
minify: minifyCore minifyBundle
minifyCore: buildCore
curl --data-urlencode "js_code@build/augmentedgesture.js" \
-d "output_format=text&output_info=compiled_code&compilation_level=SIMPLE_OPTIMIZATIONS" \
http://closure-compiler.appspot.com/compile \
>> build/augmentedgesture.min.js
@echo size minified + gzip is `gzip -c build/augmentedgesture.min.js | wc -c` byte
minifyBundle: buildBundle
curl --data-urlencode "js_code@build/augmentedgesture-bundle.js" \
-d "output_format=text&output_info=compiled_code&compilation_level=SIMPLE_OPTIMIZATIONS" \
http://closure-compiler.appspot.com/compile \
>> build/augmentedgesture-bundle.min.js
@echo size minified + gzip is `gzip -c build/augmentedgesture-bundle.min.js | wc -c` byte
.PHONY: build minify