Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Understanding & Developing Ember Addons

Understanding & Developing Ember Addons

Explaining how to develop the ember addons.

Links are not working in here. Click on Download PDF to open actual pdf and links will works there.

Dilip Kushwaha

January 28, 2016
Tweet

Other Decks in Programming

Transcript

  1. What are Ember addons anyway ? A kind of ember

    app but used as library. addons can - be consumed by Ember apps - be wrapped over non-Ember javascript libraries - add preprocessors to the default registry, e.g. ember-cli-babel - be identified by keyword `ember-addon` in package.json
  2. Structure & Creation - to create `ember addon ember-cool-addon` -

    important files & folders - addon - app - blueprints - index.js - tests/dummy - config/ember-try.js - .travis.yml
  3. addon index.js explained - acts as addon entry point. -

    runs every time with parent app - hooks - isDevelopingAddon - helps while developing addon - included - import third party libraries. - locals - customising templates
  4. Addon blueprint - blueprint structure - blueprints/{blueprint-folders} - hooks -

    normalizeEntityName - rarely used. - beforeInstall - afterInstall - locals - blueprint types - default - others - running blueprint - `ember generate {blueprint-name}`
  5. Addon default blueprint - running blueprint - automatic - manual

    - default blueprint - runs automatically along with `ember install addon-name` - can be run manually in case of addon upgrades - `ember generate addon-name` - other blueprint for extra functionality, need to run manually - `ember install blueprint-name`
  6. Publishing addons on EmberObserver.com - package.json should have `keywords: [

    ‘ember-addon’]` - Publish it on npm and it gets automatically picked up by emberobserver in some time.