Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package broken when hash is followed by jquery plugin #17

Open
krukid opened this issue Oct 8, 2010 · 1 comment
Open

package broken when hash is followed by jquery plugin #17

krukid opened this issue Oct 8, 2010 · 1 comment

Comments

@krukid
Copy link

krukid commented Oct 8, 2010

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

@grosser
Copy link

grosser commented Oct 8, 2010

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants