This addon allows to create sub-applications with a different namespace of your ember-cli project.
ember install ember-cli-custom-addons
You can pass the follow options by setting them in config/environment.js
as follow:
path
: addons pathexclude.addons
: exclude addons from buildexclude.files
: exclude addon files from build
customAddons: {
path: 'addons',
exclude: {
files: ['foo/*.coffee'],
addons: ['foo']
}
},
- Create
addons
directory inside the project root - Each folder inside
addons
directory will be merged with theapp
tree in a different namespace - Extend your application resolver to load your namespaces
dummy/
- app/
- components/
- routes/
- ...
- addons/
- foo
- components/
- routes/
- ... (same as 'app')
- bar
- ...
- public/
- vendor/
- ...
After build, inside dist/assets/app.js
, will be defined the addons modules and templates in their respectives namespaces:
// App
define('dummy/app', ['exports', 'ember', ...
define('dummy/components/foo', ['exports', 'ember', ...
// Addons
define('foo/components/foo', ['exports', 'ember', ...
define('foo/routes/bar', ['exports', 'ember', ...
define('bar/pods/index', ['exports', 'ember', ...
If you want to contribute to this addon, please read the CONTRIBUTING.md.
We use SemVer for versioning. For the versions available, see the tags on this repository.
See the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details