Skip to content

Instantly share code, notes, and snippets.

@Janiczek
Created December 15, 2016 13:59
Show Gist options
  • Save Janiczek/3767e69a1ded4a76164c5dc97f23bda0 to your computer and use it in GitHub Desktop.
Save Janiczek/3767e69a1ded4a76164c5dc97f23bda0 to your computer and use it in GitHub Desktop.
PATH_TO_JAR="node_modules/superstartup-closure-compiler/build"
JAR="${PATH_TO_JAR}/compiler.jar"
ELM_JS_FILE="app/scripts/elm_components/elm.js"
TMP_FILE=".tmp/elm.js"
if [ ! -f ${JAR} ]; then
echo "google-closure-compiler JAR not found, make sure you `npm install` the `superstartup-closure-compiler` package"
else
java -jar ${JAR} --compilation_level=ADVANCED_OPTIMIZATIONS --js="${ELM_JS_FILE}" --js_output_file="${TMP_FILE}" --language_in=ECMASCRIPT5
mv ${TMP_FILE} ${ELM_JS_FILE}
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment