Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

AMD support #616

Closed
wants to merge 3 commits into from
Closed

AMD support #616

wants to merge 3 commits into from

Conversation

akre54
Copy link
Contributor

@akre54 akre54 commented Jan 23, 2013

re-opening #612 for the 3.3-IP branch.

see https://github.com/umdjs/umd/blob/master/jqueryPlugin.js for source, and umdjs/umd#11 for a potential pitfall (not likely huge, but a caveat to note):

  • if not using an AMD module loader at all, works as normal
  • if using an AMD module loader to load jQuery, works as normal
  • if a module loader is loaded after jQuery (i.e. jQuery loaded through a script tag), and before jQuery plugins like file-uploader are loaded with a script tag, this method fails. Simple solution is to move file-uploader's script tag to before the AMD loader's, or load jQuery and the loader as a plugin, or move jQuery script tag after AMD loader's

@@ -8,3 +8,5 @@
*
* Licensed under MIT license, GNU GPL 2 or later, GNU LGPL 2 or later, see license.txt.
*/

(function(root) {

This comment was marked as spam.

@rnicholus
Copy link
Member

Thanks Adam, I hope to have time to look into this further during the 3.3 release cycle. For organization sake, this PR refers to #513.

@andrew-kzoo
Copy link
Contributor

Looks cool. Thanks @akre54 for the information on AMD and providing the wrapper code.

@@ -1,5 +1,13 @@
/*globals jQuery, qq*/

This comment was marked as spam.

@rnicholus rnicholus closed this Feb 22, 2013
@akre54
Copy link
Contributor Author

akre54 commented Feb 22, 2013

@rnicholus what's the reason for closing this? It would be helpful for my current project...

@rnicholus
Copy link
Member

Hmm, I didn't intentionally close this. I'm not even sure how that happened.

@rnicholus
Copy link
Member

In fact, I don't even have the option to re-open it. Hmm

@rnicholus
Copy link
Member

2 other PRs were listed as being closed by me at the same time, and I also can't re-open them. I'm not sure what's going on here.

@rnicholus
Copy link
Member

Oh, I know why. It may be due to the fact that I removed the 3.3-IP branch, since I've merged it into master.

@akre54
Copy link
Contributor Author

akre54 commented Feb 22, 2013

Ah, got it. I'll re-open when I get home tonight

@rnicholus
Copy link
Member

You'll have to re-open against the 3.4-IP branch, which I still must create. Sorry about this.

@akre54
Copy link
Contributor Author

akre54 commented Feb 22, 2013

Nah no worries. Ping me when its up

@rnicholus
Copy link
Member

3.4-IP has been created

@akre54 akre54 mentioned this pull request Feb 22, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants