-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
Hi - we've just put a few hours into upgrading our forked copy of bones to work with backbone 0.9.1 (latest) and underscore 1.3.1.
I'll attempt to add a patch to this comment, but the highlights follow below:
- Obviously the versions need to be bumped in Package.json
-
"underscore": "1.1.x",
-
"underscore": "1.3.x", "express": "2.4.4",
-
"backbone": "0.5.1",
-
"backbone": "0.9.1",
- in bones.js, set the server side jquery library into the imported backbone. Backbone now requires $ to be set, and the previous version was not loading it.
bones.js:
exports.Backbone = require('bones/server/backbone');
+exports.Backbone.setDomLibrary(exports.$);
- In plugin.js around lines 56/55 templates must now be passed to the client as a variable, as they're hidden using closure in the new _.template method.
-
content: 'template = ' + module.exports + ';'
-
// client must now pass escaped template content over, as _ makes it a hidden closure var
-
content: 'var content = \''+escape(content)+'\';template = _.template(unescape(content));'
There are some changes to the example app that need to be made to work with these, but these 3 items are the show stoppers and only changes to the bones project core that we needed to make things work again. We made changes in our own app rather than updating the example, so unfortunately I can't share those, but the above should work as a leg up for anyone starting to upgrade the backbone version.
Metadata
Metadata
Assignees
Labels
No labels