cramforce/jscomp — Issue #1: Other AMD test conversions
Author: jrburke
Created: 2011-11-29 06:13:16+00:00
State: open

Some other AMD forms that can be transformed:

```javascript
define(function(require) {
var a = require('a');

return function () {};
});

define(function(require, exports, module) {
//Do normal commonjs stuff in here.
//A return value is favored for exports or module.exports use.
});

//'require', 'exports' and 'module' are special dependency names that map to the commonjs notions of those items
//So when transforming, probably do not treat them as a local variable. whose value is retrieved from a require('') call.

define(['require', 'module', 'a'], function(require, module, a) {
//The CC transform should just not do a var require = ...
//or a var module = ...
});

//Object literal is allowed
define({
name: 'foo'
});
```