jrburke/requirejs — pull request #483 by tbranyen (2012-09-30 03:31:25+00:00)
Title: patch to accompany issue #482

Issue #482 discusses augmenting the `exports` property of the `shim` configuration to support an object mapping values to property identifiers to allow for exporting of multiple globals in a standard way.

An example of how this patch could be used is:

``` javascript
// Backbone.LayoutManager depends on Backbone.
"plugins/backbone.layoutmanager": {
deps: ["backbone"],
exports: {
"Layout": "Backbone.Layout",
"LayoutView": "Backbone.LayoutView"
}
},
```

Which results in an object like:

``` javascript
{
Layout: function Layout(options) {
LayoutView: function (){ parent.apply(this, arguments); }
}
```

I asked @caolan what he thought of the idea for JamJS and he replied with:
https://twitter.com/caolan/status/252245115303784448

RequireJS configuration settings will be set in JSON files. This is already happening with `grunt.js` and `package.json` files.