addyosmani/todomvc — Issue #32: Backbone+require: could use simple commonjs wrappers
Author: jrburke
Created: 2011-12-10 02:18:12+00:00
State: open

Instead of this style:

```javascript
define([
'jquery',
'underscore',
'backbone',
'collections/todos',
'views/todos',
'text!templates/stats.html'
], function($, _, Backbone, Todos, TodoView, statsTemplate){

});
```

This style can be used, it might help match up dependencies with their variable names better:

```javascript
define(function(require){

var $ = require('jquery'),
_ = require('underscore'),
Backbone = require('backbone'),
Todos = require('collections/todos'),
TodoView = require('views/todos'),
statsTemplate = require('text!templates/stats.html');

});
```

Either is fine though. Just mentioning it to create awareness of the alternative.