Search code examples
javascriptember.jsember-addon

Wrapping npm modules as Ember Addons


I am working on an Ember application and would like to create an ember addon for it. The use case for the addon would be to create an ontology tree for the consuming application. The repository for the module I would like to make into an addon is inspire tree and I am needing to wrap this module.

Here is the Inspire Tree Repository.

I am aware of the general structure of Ember addons and an idea on how to make one, but if anyone can give advice on best practices & how to wrap npm modules as addons in general would be very helpful.


Solution

  • Instead of wrapping the npm module, give https://github.com/ef4/ember-auto-import a try in your app and use via import InspireTree from 'inspire-tree'; once you've installed that module via npm.