closure-compile - Compile javascript using the Google closure API
Usage: closure-compile [options] file/url...
Options:
Specifying how aggressive the compiler should be. There are four options.
Does not call the closure service at all, just returns the Javascript code as is. This is useful if you're using a manifest file, and need to debug your code or to compile the javascript into one file without having Internet access. Note that this will only work if the values in your Manifest file are filenames, not urls.
Just removes whitespace and comments from your JavaScript.
Performs compression and optimization that does not interfere with the interaction between the compiled JavaScript and other JavaScript. This level renames only local variables.
Achieves the highest level of compression by renaming symbols in your JavaScript. When using ADVANCED_OPTIMIZATIONS compilation you must perform extra steps to preserve references to external symbols.
Specify a manifest file containing the filenames/urls that should be compiled
After the options, specify one or more filenames or urls that you wish to optimize If no filenames are specified, javascript is read from standard input
For more information, see the Google Closure Tools website:
L<http://code.google.com/closure/>
The following command will compile all javascript files in the js directory and put the output in compiled.js
cat js/*.js | closure-compile > compiled.js
Magnus Erixzon, <magnus at erixzon.com>
<magnus at erixzon.com>
Please report any bugs or feature requests to bug-webservice-google-closure at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-Google-Closure. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-webservice-google-closure at rt.cpan.org
Copyright 2010-2011 Magnus Erixzon.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install WebService::Google::Closure, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Google::Closure
CPAN shell
perl -MCPAN -e shell install WebService::Google::Closure
For more information on module installation, please visit the detailed CPAN module installation guide.