ember-cli-custom-addons

1.0.0 • Public • Published

ember-cli-custom-addons

Build Status GitHub version NPM version Dependency Status codecov Greenkeeper badge Ember Observer Score

Information

NPM

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
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

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

/ember-cli-custom-addons/

    Package Sidebar

    Install

    npm i ember-cli-custom-addons

    Weekly Downloads

    13

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    13.1 kB

    Total Files

    11

    Last publish

    Collaborators

    • adrigzr
    • bbvaengineer
    • josex2r
    • shokmaster