Closed levi closed 11 years ago
Hm, I'm not convinced this is the right approach for everyone. Not all AMD environments has jQuery loaded via AMD, in which case, this will fail.
Closing this for now unless someone can contribute a better solution, perhaps a custom build script to make an AMD version. Discussions still welcome.
jQuery is exposed by default as an AMD module whenever there is an AMD-compatible adapter loaded into global scope. This will work regardless of Require.js, since this implements the UMD spec, a universal definition for AMDs.
I was unable to load jQuery.Transit in my Require.js environment. I wrapped the plugin in a method provided by the UMD spec to optionally allow it to export its namespace in an AMD when available. More info about the code update here: https://github.com/umdjs/umd