Grow your CSS skills. Land your dream job.

Anyone use google Closure Compiler?

  • # April 15, 2013 at 4:24 am

    I recently came across the google closure compiler and started testing it with some code. Curious if anyone here has used it for production with success. If there are better alternatives that I should be aware of, Im all ears. Thanks!

    http://closure-compiler.appspot.com/home

    # April 15, 2013 at 9:13 am

    I use it all the time to make minified versions of my plugins. It is my favorite online compiler and it seems to produce the smallest code. The only time I ever had it fail was when I was trying to minify the original tablesorter code which uses `eval()` to make multi-column sorting work. GCC would strip out all of that code because the evaled variable wasn’t defined or used until the code was evaled. So I had to use Uglify instead.

    jQuery uses [Uglify.js](http://marijnhaverbeke.nl/uglifyjs), but I remember them saying they were working with Google to make GCC work for builds. Uglify is popular because you can use it with node.js.

    There is also [YUI compressor](http://refresh-sf.com/yui/), which I’ve only used once or twice, so I don’t have any constructive feedback to give about it.

    And lastly, of the compilers that I know about, is [packer](http://dean.edwards.name/packer/). It’s the oldest, and sometimes produces the smallest compiled results because of symbol obfuscation.

    # April 15, 2013 at 12:38 pm

    I’ve been using the [YUI compressor](http://refresh-sf.com/yui/ “”) but might give the Closure Compiler a go.

    # April 15, 2013 at 10:55 pm

    Hey all…

    Thanks for the input! Until now I’ve been using a JS pack/minify plugin for coda…but it doesn’t always produce the best output…which is why I began looking at closure compiler. Think I’ll mix it into my workflow now.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".