ember-cli-awesome-resolver

5.0.0 • Public • Published

ember-cli-awesome-resolver

Build Status GitHub version npm version Dependency Status

This resolver allows to use any amd module namespace defined in the configuration file.

Information

NPM

Package ember-cli-awesome-resolver
Description Ember-cli awesome resolver
Node Version >= 0.10

Installation

  • ember install ember-cli-awesome-resolver

Contributing

Usage

  • Define an array with the namespaces to use in config/environment.js
  • Import the resolver in app/app.js and create an instance passing the namespaces and the modules configuration
  • Use the resolver when creating the ember application

Example

// app/app.js
import AwesomeResolverMixin from 'ember-cli-awesome-resolver/mixins/awesome-resolver';
import config from './config/environment';


const Resolver = Ember.Resolver.extend(AwesomeResolverMixin, {
    moduleBasedResolver: true,
    namespaces: config.namespaces,
    pluralizedTypes: {
        config: 'config'
    }
});

const App = Ember.Application.extend({
    Resolver,
    rootElement: '#app',
    modulePrefix: config.modulePrefix,
    ready() {
        // Set app to ready.
        this.set('isReady', true);
    }
});

export default App;

// config/environment.js

module.exports = function(environment) {
  var ENV = {
    namespaces: ['mynamespace', 'anothernamespace', ...],

    APP: {
      // Here you can pass flags/options to your application instance
      // when it is created
    }
    ...

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

Package Sidebar

Install

npm i ember-cli-awesome-resolver

Weekly Downloads

1

Version

5.0.0

License

MIT

Unpacked Size

25.3 kB

Total Files

14

Last publish

Collaborators

  • josex2r
  • adrigzr
  • beatrizdemiguelperez
  • bbvaengineer
  • julianperezsam