asset_packager icon indicating copy to clipboard operation
asset_packager copied to clipboard

package broken when hash is followed by jquery plugin

Open krukid opened this issue 14 years ago • 1 comments

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

krukid avatar Oct 08 '10 09:10 krukid

try one of the yui forks, they should fix this error

grosser avatar Oct 08 '10 13:10 grosser