summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2014-01-05 18:07:39 -0500
committerAlex Xu <alex_y_xu@yahoo.ca>2014-01-05 18:07:39 -0500
commitf37bd20494e8146af2c17ab1de4fbae1a0e03e5b (patch)
treeaff7be970bdb972140428a8f6cbd0168903517b8
parentdfdf8b6f18fa3ef5b8eb6a4517228d67c52243da (diff)
downloadhtml5ks-f37bd20494e8146af2c17ab1de4fbae1a0e03e5b.tar.xz
html5ks-f37bd20494e8146af2c17ab1de4fbae1a0e03e5b.zip
Add uglifyjs
-rw-r--r--.gitignore1
-rw-r--r--Makefile12
2 files changed, 11 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 3668383..a1142a6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,4 @@
# generated files
/www/*.appcache
+/www/js/all.min.js*
diff --git a/Makefile b/Makefile
index b9601eb..e281264 100644
--- a/Makefile
+++ b/Makefile
@@ -10,10 +10,11 @@ CWEBP ?= cwebp
WEBPMUX ?= webpmux
CONVERT ?= convert
APNGASM ?= apngasm
+UGLIFYJS ?= uglifyjs
DUMP ?= www/dump
-all: video audio images
+all: video audio images js
# === VIDEO ===
@@ -88,7 +89,14 @@ $(DUMP)/ui/ctc_anim.png: $(CTC_ANIM_TMP)
$(DUMP)/ui/ctc_anim.webp: $(CTC_ANIM_TMP_WEBP)
$(WEBPMUX) -frame $(subst $(SPACE), +30 -frame ,$^) +30 -loop 0 -o $@
+# === JS ===
+
+js: www/js/all.min.js
+
+www/js/all.min.js: $(shell find www/js -name '*.js' ! -name all.min.js)
+ $(UGLIFYJS) $^ -o $@ --source-map $@.map --source-map-root / -p 2 -c -m
+
clean:
$(RM) $(CVIDEO) $(CAUDIO) $(WEBP) www/favicon.ico
-.PHONY: video audio images clean
+.PHONY: video audio images js clean