YUI Compressor is a jar file and runs from the command line. Because of this it is easily integrated into a build process. It looks like this:
java -jar yuicompressor-[version].jar [options] [file name]
Closure Compiler runs through a number of “scorched-earth” optimizations—it unfurls functions, rewrites variable names, and removes functions that are never called (as far as it can tell).
Closure Compiler runs through a number of “scorched-earth” optimizations—it unfurls functions, rewrites variable names, and removes functions that are never called (as far as it can tell).