diff options
author | Vladislav Zarakovsky <vlad.zar@gmail.com> | 2015-02-28 19:23:07 +0300 |
---|---|---|
committer | Vladislav Zarakovsky <vlad.zar@gmail.com> | 2015-02-28 19:23:07 +0300 |
commit | e164ca01929fae805472fd9042c5c8376385b3b0 (patch) | |
tree | af613d65847180f5f3ccc787e3b995a0475d983f | |
parent | ef7ad86af9f74ac33eb45f497075c22e640171b6 (diff) | |
download | awesomplete-e164ca01929fae805472fd9042c5c8376385b3b0.zip awesomplete-e164ca01929fae805472fd9042c5c8376385b3b0.tar.gz awesomplete-e164ca01929fae805472fd9042c5c8376385b3b0.tar.bz2 |
Add minification via Google's Closure Compiler Service.
-rw-r--r-- | Makefile | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e64d1e6 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +source = awesomplete.js + +banner = "// Awesomplete - Lea Verou - MIT license" +minified = awesomplete.min.js + +minify: + @echo "Minifying..." + @rm -f $(minified) + @echo $(banner) > $(minified) + @curl -s \ + -X POST \ + --data-urlencode 'compilation_level=SIMPLE_OPTIMIZATIONS' \ + --data-urlencode 'output_format=text' \ + --data-urlencode 'output_info=compiled_code' \ + --data-urlencode 'language=ECMASCRIPT5' \ + --data-urlencode 'js_code@$(source)' \ + http://closure-compiler.appspot.com/compile \ + >> $(minified) + +.PHONY: minify
\ No newline at end of file |