google/traceur-compiler — pull request #683 by guybedford (2014-01-18 19:08:22+00:00)
Title: AMD __module flag for System loader transpilation support

This can potentially be under a different transformer, that extends the amd transformer, perhaps "amdes6" or something like that.

Also, I couldn't find where the AMD tests were being run, so I was unable to hook up the test case here.

To explain the feature, the reason for this is I want to be able to dynamically load AMD from ES6 Module Loader, but also support loading AMD that is compiled from ES6 and should be treated like an ES6 module.

In this way, one can write ES6 modules, then transpile them back into AMD for production, and have the `System` loader behave identically, just without the Traceur step.

But, in order to distinguish handling between an AMD module and an ES6 in disguise as an AMD module, we need to have some kind of flag to know that we should treat it as the module object directly:

```javascript
new Module(amdExport)
```

instead of using the `default` property of a module, which is done for AMD exports normally for compatibility:

```javascript
new Module({ default: amdExport })
```

Suggestions welcome if there are better ways of going about this.