ember-cli blueprint - included hook not called

187 views Asked by At

I'm currently working on an ember-cli addon with a blueprint that should setup bootstrap and my overwrite-styles for any projects that include it.

The thing is that the included: function(app, parentAddon) {} hook in the index.js file of my blueprint is not being called and therefore all the sweet app.import('fu/bar'); are not being executed.

I read all the stuff on the ember-cli documentation. I "assume" it's not being called because nothing is logged to the console though I do so in the function. Also nothing is imported as I can't find the code in the vendor.js file. I'm currently tapping in the dark and hope for your help, maybe it's just a matter of configuration. The blueprint can be executed.

That's a fiddle showing my index.js file -> http://jsfiddle.net/ju4y7abb/

1

There are 1 answers

0
David Philip On BEST ANSWER

Damn, I always assumed the included hook has to sit in the index.js of the blueprint. Fact is, it has to go in the root of your addon in a file also called index.js, the entry point. The docs are not superclear on this, especially for people that just started building ember-cli addons like me but I hope this helps somebody.