square/es6-module-transpiler — pull request #18 by thomasboyt (2013-06-23 23:52:51+00:00)
Title: Spec update

This PR brings the transpiler in line - with some caveats - with the current spec:

* Replaces `export =` with `export default`
* `import 'foo' as bar` is now `import bar from 'foo'`
* The old `import bar from 'foo'` is now `import { bar } from 'foo'`
* You can now alias named imports with `import { bar as baz } from 'foo'`
* You can also alias the default import with `import { default as bar } from 'foo'`

This does lack one major feature of the ES6 module system, which is mixed named & default exports. This is because neither CommonJS nor AMD have a simple mechanic for accomplishing this.

It also starts using the [grunt-es6-module-transpiler](https://github.com/joefiorini/grunt-es6-module-transpiler) project for building. This is so that, if you break the transpiler while editing it, you won't be stuck with a broken transpiler, unable to build itself! If you'd like to rebuild the transpiler against your current version of itself, you can use the `grunt copy` command to copy it into the Grunt task's dependency directory (you can, of course, undo this with a simple `npm install`) and then build.