BackboneJs + RequireJs AMD multi-page boilerplate.(github.com)
github.com
BackboneJs + RequireJs AMD multi-page boilerplate.
https://github.com/hbarroso/backbone-boilerplate
1 comments
Haven't the newer versions of Backbone stopped supporting require.js and AMD? How does this figure into the boilerplate?
It's using the *-amd version for Backbone and jQuery.
I didnt knew they stopped supporting it. Any particular reason ?
Oops, 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#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.
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.
If 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