Skip to content

Instantly share code, notes, and snippets.

@gre
Created February 4, 2013 20:06
Show Gist options
  • Save gre/4709266 to your computer and use it in GitHub Desktop.
Save gre/4709266 to your computer and use it in GitHub Desktop.
Tiny Makefile to build your Javascript libraries with Closure Compiler minification via Cloud. ( see also http://blog.greweb.fr/?p=1713 )
LIB=myLib.min.js
all: $(LIB)
%.min.js: %.js
@curl -d compilation_level=SIMPLE_OPTIMIZATIONS -d output_format=text -d output_info=compiled_code --data-urlencode "js_code@$<" http://closure-compiler.appspot.com/compile > $@
clean:
@rm $(LIB)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment