stefanpenner/ember-cli — pull request #1544 by bcardarella (2014-08-02 18:52:11+00:00)
Title: [WIP] es6 namespaced addons

*Still under development*

This will allow one to have modules in their addons that are namespaced under their addon's name rather than the application's namespace. Expects the following directory structures:

```
addon
└── mixins
└── data-route.js
app
└── controllers
└── people.js
```

Any modules in `app/` will always be namespaced under whatever namespace the parent application has. This allows the addon developer to create common-sense defaults that get pulled into the application then can be overridden by the consuming developer in the parent project's `app/` directory.

Any modules in `addon/` will always be namespaced under the addon's name. This name is always forced to lower-cased & hyphenated. So:

```
"Ember CLI Some Addon" => "ember-cli-some-addon"
```

Then in whichever modules the consuming developer wants to use this module they can do:

```js
import DataRouteMixin from "ember-cli-some-addon/mixins/data-route";
```

This feature will traverse the `addon/` directory and build a list of modules from the available file names and merge this into `app.importWhitelist` **after** the addon's modules have been compiled to ES6.

This feature will compile the addon's assets into `vendor.js` and `vendor.css`. It does this by expecting the addon to compile its own assets into a single file then all addon's files are concat'ed into an `addon.js` then eventually concat'ed into `vendor.js`. However, this feature relies on a currently modified `broccoli-kitchen-helpers` module local on my machine. In order for this to work that module needs to accept an `allowNone` option passed into `multiGlob`. I have a diff here of what needs to be done to multiGlob: https://gist.github.com/bcardarella/9b53445896a862081a07. Then `broccoli-concat` needs to accept passing this option along. The reason is that addons might pass back nothing and concat needs to handle combining nothing into an `addon.js` file.

Other things still to be done:

- [ ] jshint
- [ ] styles
- [ ] templates