ember.js - How should I import Bower dependencies from an Ember-cli addon into the consuming application? -


i importing jquery plugin via bower used in component in ember-cli addon. however, works because defined bower dependency on plugin in both addon , consuming application.

this seems i'm doing wrong. why should consuming application have declare dependency on resource should provided addon?

the crux of matter seems app context when building. can omit bower dependency in consuming application if use following import statement in addon's index.js file:

app.import('node_modules/my-ember-cli-addon/bower_components/jquery.stickyhooters/dist/jquery.stickyhooters.min.js'); 

... breaks when build addon stand-alone application. in case, path required:

 app.import('bower_components/jquery.stickyhooters/dist/jquery.stickyhooters.min.js'); 

how intended work?

  1. declaring bower dependency in 2 places seems counter-intuitive
  2. i don't know how detect app context in index.js of addon

checkout ember-cli homepage on default blueprints. describes how can import bower component package upon installing addon.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -