Skip to content

Latest commit

 

History

History
53 lines (40 loc) · 1.47 KB

emberjs-add-on-cheat-sheet.md

File metadata and controls

53 lines (40 loc) · 1.47 KB

EmberJs Add-On Cheat Sheet

Read This Blog

Ember Addon Secrets

Blueprints

The Ember CLI API documentation for Blueprints is here, but here are some usage examples for adding Ember Add-Ons, NPM packages, and Bower packages:

When adding multiple Ember Addons use the addAddonsToProject function:

// ...
afterInstall: function(/*options*/) {
  return this.addAddonsToProject({
    packages: [
      { name: 'ember-moment' },
      // ...
      { name: 'ember-route-action-helper' }
    ]
  });
}
// ...

When adding multiple NPM projects use the addPackagesToProject function, and check out the good example in the API docs.

Notice that using Bower is not ideal as the project is going to be phased out.

When adding multiple Bower packages use the addBowerPackagesToProject function:

// ...
afterInstall: function(/*options*/) {
  return this.addBowerPackagesToProject([
    { name: 'scrollreveal' },
    // ...
    { name: 'showdown' }
  ]);
}
// ...