https://github.com/bbvaengineering/ember-cli-custom-addons
Build sub-applications inside an ember-cli project
https://github.com/bbvaengineering/ember-cli-custom-addons
Last synced: about 1 year ago
JSON representation
Build sub-applications inside an ember-cli project
- Host: GitHub
- URL: https://github.com/bbvaengineering/ember-cli-custom-addons
- Owner: BBVAEngineering
- License: mit
- Created: 2015-12-29T15:10:02.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T12:19:41.000Z (over 3 years ago)
- Last Synced: 2025-04-03T16:02:22.468Z (about 1 year ago)
- Language: JavaScript
- Size: 7.2 MB
- Stars: 3
- Watchers: 8
- Forks: 0
- Open Issues: 44
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ember-cli-custom-addons
[](https://travis-ci.org/BBVAEngineering/ember-cli-custom-addons)
[](https://badge.fury.io/gh/BBVAEngineering%2Fember-cli-custom-addons)
[](https://badge.fury.io/js/ember-cli-custom-addons)
[](https://david-dm.org/BBVAEngineering/ember-cli-custom-addons)
[](https://codecov.io/gh/BBVAEngineering/ember-cli-custom-addons)
[](https://greenkeeper.io/)
[](https://emberobserver.com/addons/ember-cli-custom-addons)
## Information
[](https://nodei.co/npm/ember-cli-custom-addons/)
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 path
* `exclude.addons`: exclude addons from build
* `exclude.files`: exclude addon files from build
```javascript
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 the `app` tree in a different namespace
* Extend your application resolver to load your namespaces
## Example
```html
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:
```js
// 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](CONTRIBUTING.md).
## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/BBVAEngineering/ember-cli-custom-addons/tags).
## Authors
See the list of [contributors](https://github.com/BBVAEngineering/ember-cli-custom-addons/graphs/contributors) who participated in this project.
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details