How to force google closure compiler to keep “use strict”; in the compiled js code?

Update: strict mode is now supported in the compiler. Just use –language_in=ECMASCRIPT5_STRICT. References: http://code.google.com/p/closure-compiler/issues/detail?id=69 http://code.google.com/p/closure-compiler/source/detail?r=873 http://code.google.com/p/closure-compiler/source/detail?r=1114

Google Closure Compiler with jQuery applications

Google Closure Compiler is jQuery or any other library agnostic. It has two types of optimizations – Simple Advanced I tried applying advanced optimizations, but it severely broke my application. If it does the same, you could either try to fix your application, or use simple optimization. There was a 32% drop in size with … Read more

jQuery compiled with Google Closure Compiler

John Resig reported a bug on recursive functions when he attempted to compile a nightly of jQuery 1.4, so there are a few kinks to be worked out. I wouldn’t use a jQuery compiled with Closure Compiler without making sure it passes the jQuery testbed. http://code.google.com/p/closure-compiler/issues/detail?id=1&can=1#c2

How does Angular JS relate to Google Closure?

The only Google project I’m aware of that uses AngularJS is the DoubleClick team. (presentation) Essentially, they still use Google Closure Library for everything but the UI building. Also note that they use Google Closure Compiler, but that’s almost a given, “nobody” uses only the Library without the Compiler. Google Closure Library comes with a … Read more

Google Closure minifier online?

How about google’s own service: http://closure-compiler.appspot.com/home I should point out that “setting up the entire project on my own” really is not half as scary as you make it out to be :p. I mean, it’s a matter of downloading a java.jar and running it. Instructions: Download at http://closure-compiler.googlecode.com/files/compiler-latest.zip Unzip run java command line: java … Read more

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

“Whichever you find best for you” I think is the general answer at the moment – YUI has been available longer so undoubtedly will be the one which currently has the consensus as being the best tool. Whereas Closure is new to us – so there isn’t the wealth of experience with Closure as there … Read more

TinyMCE Paths, How to specify where to load things like editor_plugin.js

I had the same issue, and it could have been solved easily if we were able to specify the base url using the document_base_url. Alternatively, I was able to specify the base url before initializing tinymce. tinyMCE.baseURL = “URL_TO/tinymce/jscripts/tiny_mce/”;// trailing slash important tinyMCE.init({ mode : “textareas”, theme : “simple” }); TinyMCE is working fine now.

difference between “void 0 ” and “undefined”

From MDN: The void operator evaluates the given expression and then returns undefined. This operator allows inserting expressions that produce side effects into places where an expression that evaluates to undefined is desired. The void operator is often used merely to obtain the undefined primitive value, usually using “void(0)” (which is equivalent to “void 0“). … Read more

How to document a string type in jsdoc with limited possible values

As of late 2014 in jsdoc3 you have the possibility to write: /** * @param {(‘rect’|’circle’|’ellipse’)} shapeType – The allowed type of the shape */ Shape.prototype.getType = function (shapeType) { return this.type; }; Of course this will not be as reusable as a dedicated enum but in many cases a dummy enum is an overkill … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)