closure

warning: Creating default object from empty value in /home/sunetos/adamia.com/drupal-6.14/modules/taxonomy/taxonomy.pages.inc on line 34.

How to Use Google Closure's Advanced Mode Without Breaking Everything

For adamia3d I wanted to use Google Closure for minification, and I particularly wanted the maximum setting for dead code removal and function inlining. If I could make anonymous functions that I knew would get inlined, I could organize the code much better in the innermost parts of the engine (where functions are off-limits due to the performance hit of a function call in javascript). However, the maximum setting of Closure, ADVANCED_OPTIMIZATIONS, completely destroys the source for a library. Adamia3d is an open-source library, and I want every class and every property to be considered public and hackable by its users. Unfortunately Closure renames every single class and member unless you modify your source to accomodate (using class['member'] instead of class.member everywhere). Modifying my source like this is unreasonable, so I came up with a nifty hack around it.