upgrade to npm@3
We should run npm dedupe for moar smallers bundles.
Doesn't browserify implicitly dedupe based on package contents?
At this point? Possibly. If someone could confirm that would be great. @thlorenz might know.
Just fyi I'm going to be working on this – or something similar – this weekend. Right now it seems to be impossible to load Marionette.
The issue is that Backbone optionally supports jQuery, but doesn't explicitly require it. Marionette, on the other hand, has a hard dep on jQuery, but only references Backbone.$ when accessing it. Accordingly, to load Marionette, you must do:
var Backbone = require('backbone');
var $ = Backbone.$ = require('jquery');
var Marionette = require('backbone.marionette');
Right now, Marionette is pulling in its own Backbone and throwing an error. So I think deduping the dep tree will fix the problem.
browserify dedupes based on file contents.
It's entirely possible that wzrd.in is running with an old version of browserify. Check the package.json and ask max about it.
I admit I'm not too familiar with Browserify's release history, but it seems like deduping was added in this PR, released as v5.12.1.
browserify-cdn relies on ^5.10.1, so if the above is correct, then fresh installs of browserify-cdn should pull in that release of browserify.
With that said, there have been 2 major releases of browserify since then. Nothing in the changelog mentions updates to deduping, but I have yet to check if simply updating the dep will fix this problem.
It's entirely possible that wzrd.in is running with an old version of browserify. Check the package.json and ask max about it.
Good suggestion, but I'm running my own instance of browserify-cdn and running into the same issue. My instance is using the latest 5.x release.