mardi 26 mai 2015

How do you import a newly created ember addon?

I'm trying to create my first Ember AddOn and I'm getting stuck importing it into an Ember project. I've created the addon and published to github like this:

ember-cli$ ember addon test-addon
ember-cli$ cd test-addon
ember-cli/test-addon$ git remote add origin <github-url>

Then, from my project, I've tried to import the addon:

# app/rotues/index.coffee
import TestAddon from 'test-addon'

But, I'm getting this error on the console:

Uncaught Error: Could not find module `test-addon` imported from `test-app/routes/index`

Any ideas where I'm going wrong? I can see the addon in the node_modules directory but not in bower_components. I think(tm) this is my issue but I'm not sure what else I need to do to setup my addon.




Aucun commentaire:

Enregistrer un commentaire