asset_packager
asset_packager copied to clipboard
package broken when hash is followed by jquery plugin
JS package is broken when merging a hash followed by a typical jquery plugin. Example:
<first.js> Tools={ myfn: function() {} }
<second.js> (function($){...})(jQuery)
after packaging this essentially produces the following: Tools={...}(function($){...})(jQuery)
which, upon execution, crashes with the following error: ({myfn:(function () {...}) is not a function
...and the rest of the package may be broken as well to a varying extent.
to fix that, one must explicitly separate the hash and the plugin with a semicolon:
<first.js> Tools={ ... }; //<-- !!!
bottomline is - that sucks
try one of the yui forks, they should fix this error