ember-component-css
ember-component-css copied to clipboard
feat: Engine support
Engines do not appear supported right now since the currentPath contains the prefix of the engine name. However, the podName manifest is keyed off the route name.
For example, the engine name is ember-blog
and the route name is home
. The currentPath is engine-blog.home
and in the manifest it's keyed off as home
and therefore the generated class name isn't able to be looked up.
Unsure the best path forward here. When enumerating over an engine, should it take the engine name? This gets tricky when as
is used i.e., this.mount('ember-blog', { as: 'blog' });
as it's now kind of difficult to figure out the engine name since it's aliased at runtime. For now, we can treat it as a known limitation until we come up with a solution.
Thoughts?
ok. we'll have to look at that. this is the next "iteration" that's getting very close to coming. https://github.com/webark/ember-component-css/tree/registry-way It's a fairly different approach.. but it's using a lookup still for the route styles that will have to get updated to take this into account. I think we might have to do some of the adding in the styleNamespace to the routes directly, it's just annoying to have to generate a whole route file if one doesn't exist durring build.