4 ms·
BackboneJs + RequireJs AMD multi-page boilerplate.
- gee_totes 14y agoHaven't the newer versions of Backbone stopped supporting require.js and AMD? How does this figure into the boilerplate?
- phatbyte 14y agoIt's using the *-amd version for Backbone and jQuery. I didnt knew they stopped supporting it. Any particular reason ?
- gee_totes 14y agoOops, my bad, I misspoke. I looks like easy AMD comparability was removed from underscore, not backbone, since people were getting confused (?) trying to load underscore correctly (??). https://github.com/documentcloud/underscore/pull/431#issuecomment-3452856 https://github.com/documentcloud/underscore/pull/431#issueco... In the meantime, as long as you are using the right "shims" you should be able to work fine with the stock copy of Backbone. (It looks like a correct "shim" defines the load order and returns a backbone object, not a closure (I am looking at app.js and am 50% sure that it is a closure, but I could be wrong)) From digging through the above link, it looks like the removal had something to do with how the libraries were being loaded in.
- gregfranko 14y agoIf you want to see how to use Backbone.js and Require.js together, check out my boilerplate project- https://github.com/gfranko/Backbone-Require-Boilerplate https://github.com/gfranko/Backbone-Require-Boilerplate