ember-cli-custom-addons
v1.0.0
Published
Create sub-applications in your ember-cli project
Downloads
4
Readme
ember-cli-custom-addons
Information
This addon allows to create sub-applications with a different namespace of your ember-cli project.
Installation
ember install ember-cli-custom-addons
Options
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']
}
},
Usage
- 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
Example
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', ...
Contribute
If you want to contribute to this addon, please read the CONTRIBUTING.md.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
See the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE.md file for details