EAK with vendor supplied components/templates
Closed this issue · 8 comments
How can I get EAK to load vendor templates like EmberUI ..Iike vendor/emberui/dist/amd/templates? I did bower install of emberui. It includes components / templates etc. I can include each JS file in the index.html ...but I do not know how to load the templates etc without copying them to my app/ folders?
Can I add the directories to the loader.js somehow...and this is not ES6 they have AMD or CommonJS???
@cwiese I'm not sure if I get the question correctly, but here's a possible explanation specifically about ember-ui,
you can look at how that's used on the website
https://github.com/emberui/website/blob/master/app/index.html#L69 (note the use of named-amd, that is one file)
it just uses an initializers, so that when you require the library templates (as well as components) they are registered into the application container.
https://github.com/emberui/emberui/blob/master/lib/main.js#L51-L85
thank you ghedamat - I get that. I will try that now!
No.... while using AMD load (main.js) looked promising - I had issues with esp with the templates. I copied everything into the app/component folders! I will dig deeper when I switch to Ember CLI. It seems the "convention or configuration" and "black magic" injection is MUCH harder to work with...I would rather do it the hard way first and understand then let the auto-magic take over.
@cwiese I'm not sure on what you're experiencing, with EmberUI you don't need to copy the templates as requiring the module will trigger the initializers (or you can require just those).
that said, feel free to open an issue on https://github.com/emberui/emberui an maybe we can help you there.
I know it is not right to copy the files trust me! I could not get EAK to play correctly with EmberUI.
I will give it another shot when I migrate to Ember CLI ..
On May 23, 2014, at 10:26 AM, Mattia Gheda notifications@github.com wrote:
@cwiese I'm not sure on what you're experiencing, with EmberUI you don't need to copy the templates as requiring the module will trigger the initializers.
that said, feel free to open an issue on https://github.com/emberui/emberui an maybe we can help you there.
—
Reply to this email directly or view it on GitHub.
Yes. I will re-open if needed. Thanks!
On May 25, 2014, at 7:11 AM, Manuel Wiedenmann notifications@github.com wrote:
@cwiese can we close the issue?
—
Reply to this email directly or view it on GitHub.