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?
- declaring bower dependency in 2 places seems counter-intuitive
- i don't know how detect
app
context inindex.js
of addon
checkout ember-cli homepage on default blueprints. describes how can import bower component package upon installing addon.
Comments
Post a Comment