Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Initial attempt at AMD support #99
This is my initial attempt at AMD support for issue #66, with supporting tests. I've made some compromises to make the diff smaller. Ideally, the source files should be renamed to match the module name (ie Base64.js instead of base64.js) so that you don't need the path mapping in requirejs.config. I've also added an example using AMD.
I will squash the commits before merging once getting some feedback.
Should Strophe still define window globals even if AMD is used? There are a lot of Strophe plugins which expect globals. I've found that using the shim config in require.js is unreliable for Strophe plugins which expect the Strophe global. The amdWebGlobal.js below defines a global even if AMD is being used.