yui/yui3 — pull request #1407 by caridy (2013-11-15 01:18:09+00:00)
Title: feature flag `es`: adding support for loader to attach ES-compatible modules

This PR enables loader to support transpiled ES6 to YUI modules by providing the proper hooks to pass in `imports` and handle `exports` accordingly. This is a low risk change with a feature flag called `es`, that need to be enabled per module.

An `es6` module transpiled into yui will look like this:

```
import FooClass from "foo";
var BarClass = doSometingToExtend(FooClass);
export default BarClass;
```

the transpiler output will be like this:

```
YUI.add("bar", function(Y, NAME, __imports__, __exports__) {
var FooClass = __imports__["foo"]["default"];
var BarClass = doSometingToExtend(FooClass);
__exports__["default"] = BarClass;
return __exports__;
}, "@VERSION@", {"es":true, "requires":["foo"]});
```

This PR just enables the use of `__imports__` and `__exports__` accordingly to support this type of module.