Skip to content

Instantly share code, notes, and snippets.

@badsyntax
Created November 2, 2010 22:24
Show Gist options
  • Save badsyntax/660417 to your computer and use it in GitHub Desktop.
Save badsyntax/660417 to your computer and use it in GitHub Desktop.
a shell snippet to use google's closure compiler to minify a javascipt file
in=yourfile.js
out=yourfile.min.js
curl -s \
-d compilation_level=SIMPLE_OPTIMIZATIONS \
-d output_format=text \
-d output_info=compiled_code \
--data-urlencode "js_code@${in}" \
http://closure-compiler.appspot.com/compile \
> $out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment