ModelN/backbone.geppetto — pull request #47 by creynders (2014-08-12 10:01:34+00:00)
Title: Make compatible with CommonJS

I'm moving away from RequireJS since it's so ... um ... I dunno, I just keep on struggling with it and I loathe the boilerplate. So I'm migrating to Browserify which is really awesome, especially since I do front and backend, which means I can use the same module importing syntax on both.

1. I added the necessary code to geppetto to allow it to be loaded CommonJS style
1. I moved "backbone" from being a dev dependency to being a real dependency and added underscore as a dependency as well. This allows the installation of geppetto through npm instead of bower
1. I changed "main" in package.json to point to the geppeto file. This allows loading geppetto with `require("backbone.geppetto")` otherwise you need to provide a path (i.e. `require("backbone.geppetto/backbone.geppetto")`)

I have no idea how to test this through mocha, so I did some manual testing and it all worked out. I looked at Marionette and they don't seem to be testing whether the framework's exposed as CommonJS module either.