Created
September 3, 2013 19:15
-
-
Save bolmaster2/6428292 to your computer and use it in GitHub Desktop.
Concatenate and minify your JS-files with closure compiler API using curl
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/bash | |
output_file='all.min.js' | |
tmp_file='tmp.js' | |
cat my_js_1.js my_js_2.js > $tmp_file | |
curl -d compilation_level=SIMPLE_OPTIMIZATIONS -d output_format=text -d output_info=compiled_code --data-urlencode "js_code@${tmp_file}" http://closure-compiler.appspot.com/compile > $output_file | |
rm $tmp_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment