X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=compile-with-closure.sh;h=90d9d9a30847fa64ce92c17db72cf497282d1f4a;hb=4a401b38137b4c4bd09dff59dafb4665874274f4;hp=50a93f20055881ee6a9876c9ce1e40d0b610a3a3;hpb=21e45828cdeb2e90f7884b382239f1bce13307c5;p=dygraphs.git diff --git a/compile-with-closure.sh b/compile-with-closure.sh index 50a93f2..90d9d9a 100755 --- a/compile-with-closure.sh +++ b/compile-with-closure.sh @@ -6,11 +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 \ +CLOSURE_COMPILER=node_modules/closure-compiler/lib/vendor/compiler.jar +BASE_JS=node_modules/obvious-closure-library/closure/goog/base.js +if [[ (! -f $CLOSURE_COMPILER) || (! -f $BASE_JS) ]]; then + echo "Missing compiler.jar or base.js. Try running 'npm install'." 1>&2 + exit 1 +fi + +java -jar $CLOSURE_COMPILER \ --compilation_level ADVANCED_OPTIMIZATIONS \ --warning_level VERBOSE \ --output_wrapper='(function() {%output%})();' \ - --js ../../closure-library-read-only/closure/goog/base.js \ + --js $BASE_JS \ --js=dashed-canvas.js \ --js=dygraph-options.js \ --js=dygraph-layout.js \