emberjs/ember.js — pull request #4338 by rjackson (2014-02-10 07:57:15+00:00)
Title: Allow ES6ification of specific packages.

The purpose of this PR is to allow us to migrate to ES6 module format gradually over time. I used the `container` package as a guinea pig because it was already assumed to be AMD in the rest of the code, and it does not live elsewhere as an ES6 project already.

This uses the `es6-module-transpiler` with a custom generator script (found in `bin/transpile-packages.js`). The custom script does a few things differently from the `compile-modules` script that comes with the transpiler:

* Modify the generated package names so that it matches current build tooling.

Examples:

* A file named `packages_es6/some-package/lib/blahzorz.js` will create a module named
`some-package/blahzorz`.
* A file named `packages_es6/some-package/tests/blammo_test.js` will
create a module named `some-package/tests/blammo_test`.
* Any modules generated from the packages `lib/` directory will be
transpiled from the `packages_es6/package-name/lib/` directory to the
`packages/package-name/lib/main.js` file. This file will contain all
of the modules from the package.
* Any modules generated from the packages `tests/` directory will be
transpiled from `packages_es6/package-name/tests/` directory to the
`packages/package-name/tests/package-name_test.js` file.
* At the end of the transpiled test file, all of the testing modules are
required (to ensure the tests are run).

------

This requires `https://github.com/emberjs/ember-dev/pull/129` to be merged, and the `Gemfile` in this PR to be updated before merging.

/cc @ebryn