I'm trying to migrate to ember-cli from some old homegrown build tools. Our app is quite large and is actually split into several ember.js single page apps (e.g. index, admin, reports, etc) that share a common set of utils and components.
I'm trying to figure out if that's even possible with ember-cli and if so, how do I do it? I saw some people talking about pods, others talking about addons and yet another set of people talking about private bower repos. I tried finding out information on each of these, but it seems it's all in a bit of flux.
I'm not picky about the directory structure or the details. But I guess this is how I would envision it:
[app]
- [controllers]
- [models]
- [routes]
- [views]
- index.html
[admin]
- [controllers]
- [models]
- [routes]
- [views]
- index.html
[reports]
- [controllers]
- [models]
- [routes]
- [views]
- index.html
[shared_code]
- [components]
- [utils]
Brocfile.js
etc
Any advice would be greatly appreciated. Even just a starting point would be immensely helpful.
Edit (Jan 28th 2015):
Ember-cli addons are more stable now and could be used for this application. But IMHO they still have some short comings for this use case. They create more boiler plate as you still have to import individual models/controllers/components/etc into your application space. See the "Components" section under the addons here: http://www.ember-cli.com/#managing-addon-dependencies
There is also an interesting RFC to bring engine like support to ember and ember-cli that could satisfy this as well: https://github.com/emberjs/rfcs/pull/10
Edit (October 3rd 2015):
There is a new update to the Engines RFC and that looks promising for many users. However, we still have the need for multiple apps which are actually different. Another developer I work with spent sometime to flush out the details of how best to use this pattern.
I've documented that and created demo in a repo: https://github.com/workmanw/ember-multi-app
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…