yeoman/generator-backbone — pull request #107 by raphaelvalerio (2013-07-23 18:17:10+00:00)
Title: Use (and shim) core Backbone and Underscore Bower packages for scaffolding with RequireJS

Previously, when a user scaffolded a new app with this generator and chose to include RequireJS, AMD-compatible forks of Underscore and Backbone were installed by Bower (`backbone-amd` and `underscore-amd`), which were then (unnecessarily) shimmed by RequireJS in `main.js`. This pull request alters the generator to instead install the core non-amd Bower packages of Underscore and Backbone (`underscore` and `backbone`) and shim them in `main.js`.

Essentially, the original `shim` directives in `require.config` remain untouched, but the non-amd Bower packages of Underscore and Backbone (which require shimming to be used with RJS) are now used instead of the amd forks. This pull request makes no changes to scaffolding an app without RequireJS.

For the relevant discussion that led to this pull request, see this issue thread: https://github.com/yeoman/generator-backbone/issues/101

I've thoroughly tested this branch and everything seems to work great. However, full disclosure: when I run `npm test` in the forked repo, I receive the following npm error:

Backbone generator test
✔ every generator can be required without throwing
1) "before each" hook
x 1 of 12 tests failed:
1) Backbone generator test "before each" hook:
Error: EBUSY, unlink 'path/to/generator-backbone/test/temp'

npm ERR! weird error 1
npm ERR! not ok code 0

This doesn't appear to be a failed test, but rather an npm problem on my machine. I'm not a Mocha expert unfortunately, so I can't verify this. If this represents a real problem with testing the repo, please let me know and I'll rectify it.