asciidisco/Backbone.Marionette.Handlebars — pull request #2 by lauripiispanen (2012-09-13 12:54:35+00:00)
Title: Remove the need to require 'backbone.marionette.handlebars' in all views

I don't know how controversial this change would be, but I find it slightly dissatisfying having to write

```javascript
define([
'backbone.marionette',
'backbone/backbone.marionette.handlebars',
'hbs!Template/category',
],
function (Marionette, MarionetteHandlebars, categoryTpl) {
...
```

In all of my views just so that this plugin would kick in. I tried defining it in _deps_ config of requirejs, but it won't work, since the module has to be loaded effectively twice: once for the initializer to be injected, which replaces itself with a new anonymous module, and then again two activate the module. For this reason I propose changing the "define a new module" approach taken by the plugin to a "require" call instead. This will allow the plugin to be defined only once in _deps_ config of require.