google-closure-compiler

Should I use the YUI Compressor or the new Google Closure compiler to compress my JavaScript?

YUI Compressor was the consensus best tool for minimizing, but Closure seems like it could be better. ...

jQuery compiled with Google Closure Compiler

Has anyone compiled jQuery against Google's newly-released Closure compiler? There has been reported huge savings in code size. I'm curious what the benefit is if jQuery was compiled with it. ...

How to use Google's Closure to compile JavaScript

Google just released Closure, which is a compiler to minify JavaScript. On the product site, it says "The Closure Compiler has also been integrated with Page Speed". How do I use Page Speed to compile my web pages JavaScript with Closure? (Or, is there a web site that I can simply paste in my JavaScript to have closure minify it? ...

Equivalent of "Google Closure Compiler" for HTML?

Is there an equivalent of Google's Closure Compiler for HTML minimizing? ...

Google closure compiler error "Variable COMPILED first declared in {SyntheticVarsDeclar}"

When using the Google closure compiler to try and compile a load of closure dependencies taken from their editor demo (no external code) using calcdeps.py I get the following error when then running the compiler on the produced code (which runs fine): {SyntheticVarsDeclar}: ERROR - Variable COMPILED first declared in {SyntheticVarsDecl...

google closure compile jQuery Plugin

I'm testing google closure-compiler and wanting to compile facebox Plugin with the option "Advanced" , an error occurs the function trying to find "a.H". Has anyone tried to compile with this option jQuery plugins with a good result. Thank you. EDIT: Clearly this re-naming the jQuery methods, but is it possible to include jQuery and ...

One click closure windows tool to compile all js files in folder

Is there a tool or a bat file or some such that allows one click to compile all js files inside a folder into one compiled js file? Thanks. ...

How to apply Google Closure to my entire web page?

Google has the very nice JavaScript compressor called "Closure" http://closure-compiler.appspot.com/home But it's a pain to use for inline JavaScript within an HTML file. Question: Does an online tool exist where I simply give the input "uncompress.html" and it spits out the compressed version of that HTML with all inline JavaScript c...

dojo and google closure compiler

I noticed that dojo 1.4.0 support google compiler in simple mode, will it eventually support advance mode anytime soon??? ...

How i can mark function as "private" to renaming it by Google Closure Compiler?

I have private function createSomething(): function Player(id) { /** * Creates stuff * @private */ this.createSomething = function() { // do something good }; } and i want to see renamed function "createSomething()" after compiling source by Google Closure Compiler. Yes i know about ADVANCED_OPTIMIZATIONS but it ...

Help with writing a php code that repeats itself per array value

Hi I'm using Closure Compiler to compress and join a few JavaScript files the syntax is something like this; $c = new PhpClosure(); $c->add("JavaScriptA.js") ->add("JavaScriptB.js") ->write(); How could I make it systematically add more files from an array lets say for each array element in $file = array('JavaScriptA.js','JavaScri...

is jQuery 1.4.2 compatible with Closure Compiler?

According to the official release statement version 1.4 has been re-written to be compressed with Closure Compiler yet when I use the online version of closure compiler I get 130 warnings. This is the code I use. // ==ClosureCompiler== // @compilation_level ADVANCED_OPTIMIZATIONS // @output_file_name default.js // @code_url http://ajax...

Php error in closure compiler execution

When I run php-closure i get a PHP error Undefined index: HTTP_IF_NONE_MATCH in <b>/php-closure.php</b> on line <b>183</b> Line 184 of php-closure is trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag) { This error only happens when closure has already written the compressed javascript file to the directory once, if the directory is em...

How can I easily maintain a cross-file JavaScript Library Development Environment

I have been developing a new JavaScript application which is rapidly growing in size. My entire JavaScript Application has been encapsulated inside a single function, in a single file, in a way like this: (function(){ var uniqueApplication = window.uniqueApplication = function(opts){ if (opts.featureOne) { t...

Exclude debug javascript code during minification

I'm looking into different ways to minify my javascript code including the regular JSMin, Packer, and YUI solutions. I'm really interested in the new Google Closure Compiler, as it looks exceptionally powerful. I noticed that Dean Edwards packer has a feature to exclude lines of code that start with three semicolons. This is handy to e...

Why does Google's Closure Compiler leave a few unnecessary spaces or line breaks?

I've noticed that every time I use Google's Closure Compiler Service, it leaves a few unnecessary spaces in the compiled code presented on the right-hand side of the page. These correspond to line breaks in the hosted version of the compiled code. For example (note the line breaks, each of which seems unnecessary): http://troy.onespot....

Preventing closure compiler from renaming certain variables

I have a javascript file with a global object that must not be renamed (_gat from the Google Analytics async tracker). This object must not be renamed by the Google Closure Compiler as Google Analytics looks for a variable with this specific name. I've looked into the Javascript Doc notations that are mentioned: http://code.google.com/...

Any ideas on how to use Google Closure Compiler to combine multiple javascript files w/o any optimizations?

Any ideas on how to use Google Closure Compiler to combine multiple JavaScript files w/o any optimizations? Specifically, we want to use Closure to deploy two versions of our combined site JavaScript: release and debug. For release, we are using --compilation_level SIMPLE_OPTIMIZATIONS --manage_closure_dependencies which is working as ...

How do I use Google Closure compiler to remove used JavaScript code?

How do I use Google Closure compiler to remove unused code? I am using the JQuery Slider control but am not using anything else within JQuery. So I read that Google Closure compiler in Advanced mode can remove unused code, but I don't know how. I have frontpage.html that links to an external JQuery, JQuery UI and JQuery Slider control ...

Using the --module option in Closure Compiler to create multiple output files

I'm creating a fairly large library of JavaScript, using Closure Compiler for both its wonderful compression as well as the type-checking and warning systems. I want to create multiple output files though, because the files are loaded asynchronously (and some files are only loaded on-demand). Poking around the source code, I've found t...