X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=compile-with-closure.sh;h=496a2442f108697533fac2220ff6e5fbfeacedd3;hb=d6eb5c59dcbc22c942a266b57e95d3111db6fcae;hp=50a93f20055881ee6a9876c9ce1e40d0b610a3a3;hpb=21e45828cdeb2e90f7884b382239f1bce13307c5;p=dygraphs.git diff --git a/compile-with-closure.sh b/compile-with-closure.sh index 50a93f2..496a244 100755 --- a/compile-with-closure.sh +++ b/compile-with-closure.sh @@ -6,7 +6,18 @@ # It outputs minified JS to a temp file. This should be ignored for now, until # it's fully functional. -java -jar ../../closure-compiler-read-only/build/compiler.jar \ +if [ $# -ne 1 ]; then + echo "Usage: $0 (path/to/closure/compiler.jar)" 1>&2 + exit 1 +fi +if [ ! -f $1 ]; then + echo "$1 does not exist" + exit 1 +fi + +CLOSURE_COMPILER=$1 + +java -jar $CLOSURE_COMPILER \ --compilation_level ADVANCED_OPTIMIZATIONS \ --warning_level VERBOSE \ --output_wrapper='(function() {%output%})();' \