Created
November 25, 2012 13:34
-
-
Save gurdiga/4143516 to your computer and use it in GitHub Desktop.
JS minifying script with curl and Closure Compiler REST API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Use like this: | |
# | |
# minify-js.sh < app.js > app.min.js | |
# | |
curl -s \ | |
-d compilation_level=SIMPLE_OPTIMIZATIONS \ | |
-d output_format=text \ | |
-d output_info=compiled_code \ | |
-d charset=utf-8 \ | |
--data-urlencode "js_code@-" \ | |
http://closure-compiler.appspot.com/compile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment