Skip to content

Instantly share code, notes, and snippets.

@DmitryMyadzelets
Created April 23, 2015 14:37
Show Gist options
  • Save DmitryMyadzelets/66134b7bca62284f5d55 to your computer and use it in GitHub Desktop.
Save DmitryMyadzelets/66134b7bca62284f5d55 to your computer and use it in GitHub Desktop.
Compresses JS file using Google Closure Compiler's Web API
# usage: ./compress_js.sh file.js compressed/file.js
curl -d compilation_level=SIMPLE_OPTIMIZATIONS -d output_format=text -d output_info=compiled_code --data-urlencode "js_code@$1" http://closure-compiler.appspot.com/compile > $2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment