-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile
executable file
·40 lines (34 loc) · 1.14 KB
/
compile
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
#!/bin/sh
# Make sure we're working in the directory that the script is in.
cd `dirname $0`
# Store the full path to this directory in a variable.
SRC_ROOT=`pwd`
if [ -d src/closure-library ]; then
if [ `find src/closure-library/.svn -maxdepth 0 -mtime +1d | wc -l` -eq 1 ]; then
echo Making sure Closure library is up-to-date...
cd src/closure-library
svn up
cd ../..
fi
else
echo Fetching Closure library...
svn checkout http://closure-library.googlecode.com/svn/trunk/ src/closure-library
fi
if [ ! -d out ]; then
mkdir out
fi
cp -f src/demo.html out
src/closure-library/closure/bin/build/closurebuilder.py \
--root=src/ \
--namespace="demo.main" \
--output_mode=compiled \
--compiler_jar=build/compiler.jar \
--compiler_flags="--externs=build/externs.js" \
--compiler_flags="--compilation_level=ADVANCED_OPTIMIZATIONS" \
--compiler_flags="--warning_level=VERBOSE" \
--compiler_flags="--summary_detail_level=3" \
--compiler_flags="--define='inf.DEBUG=false'" \
> out/demo.js
src/closure-library/closure/bin/build/depswriter.py \
--root_with_prefix="src ../../../" \
> src/deps.js