forked from piglovesyou/closure-scroller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
28 lines (25 loc) · 1021 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
COMPILER_ZIP = compiler-latest.zip
COMPILER_REMOTE_DIR = http://closure-compiler.googlecode.com/files/$(COMPILER_ZIP)
COMPILER_DIR = closure-compiler/
COMPILER_JAR = $(COMPILER_DIR)/compiler.jar
CLOSURELIB_DIR = ./closure-library-read-only
CLOSURELIB_REMOTE_DIR = http://closure-library.googlecode.com/svn/trunk/
DUMMY_CLIENTSCRIPT_PATH = public/javascripts/app.js
setup:;
rm -rf $(COMPILER_DIR) && \
wget -P $(COMPILER_DIR) $(COMPILER_REMOTE_DIR) && \
unzip -d $(COMPILER_DIR) $(COMPILER_DIR)$(COMPILER_ZIP) && \
rm $(COMPILER_DIR)$(COMPILER_ZIP) && \
rm -rf $(CLOSURELIB_DIR) && \
svn checkout $(CLOSURELIB_REMOTE_DIR) $(CLOSURELIB_DIR)
compile:;
$(CLOSURELIB_DIR)/closure/bin/build/closurebuilder.py \
--root=$(CLOSURELIB_DIR) \
--root=piglovesyou \
--root=compiled \
--namespace="my.app" \
--compiler_jar=$(COMPILER_JAR) \
--compiler_flags="--compilation_level=ADVANCED_OPTIMIZATIONS" \
--compiler_flags="--warning_level=VERBOSE" \
--output_mode=compiled \
> compiled/min.js