An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# ember-cli-custom-addons

[![Build Status](https://travis-ci.org/BBVAEngineering/ember-cli-custom-addons.svg?branch=master)](https://travis-ci.org/BBVAEngineering/ember-cli-custom-addons)
[![GitHub version](https://badge.fury.io/gh/BBVAEngineering%2Fember-cli-custom-addons.svg)](https://badge.fury.io/gh/BBVAEngineering%2Fember-cli-custom-addons)
[![NPM version](https://badge.fury.io/js/ember-cli-custom-addons.svg)](https://badge.fury.io/js/ember-cli-custom-addons)
[![Dependency Status](https://david-dm.org/BBVAEngineering/ember-cli-custom-addons.svg)](https://david-dm.org/BBVAEngineering/ember-cli-custom-addons)
[![codecov](https://codecov.io/gh/BBVAEngineering/ember-cli-custom-addons/branch/master/graph/badge.svg)](https://codecov.io/gh/BBVAEngineering/ember-cli-custom-addons)
[![Greenkeeper badge](https://badges.greenkeeper.io/BBVAEngineering/ember-cli-custom-addons.svg)](https://greenkeeper.io/)
[![Ember Observer Score](https://emberobserver.com/badges/ember-cli-custom-addons.svg)](https://emberobserver.com/addons/ember-cli-custom-addons)

## Information

[![NPM](https://nodei.co/npm/ember-cli-custom-addons.png?downloads=true&downloadRank=true)](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