You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am generating an addon which relies on ember-component-css. I would like to be able to generate component styles for the components provided by my addon (e.g. the components in addon/pods/components). However, these styles don't seem to be compiled and the component doesn't get it's className adjusted.
I tried adding the scss file to the corresponding file in app/pods/components and this works correctly when developing the addon. When the addon is installed into another app it fails, however.
I came across #54 when investigating and I wasn't clear if this was the same issue?
Is my use-case supported? Is there a way that I can opt into it (maybe merging the relevant files from the addon into the app in treeFor?)?
Thanks!
The text was updated successfully, but these errors were encountered:
I seem to have this working in my addon with the following code:
treeForApp: function(tree){// We need to merge in the styles from our addon back into the app so that they// get seen by ember-component-css and compiledvaraddonComponentsDir='addon/pods/components/';if(!this.isDevelopingAddon()){addonComponentsDir=['node_modules',this.name,addonComponentsDir].join('/');}varcopiedStylesTree=newFunnel(addonComponentsDir,{include: [/\.s?css$/],destDir: 'pods/components/'});returnmergeTrees([copiedStylesTree,tree]);;}
I'm not sure if this should be recommended or considered correct but it's working for me for now....
I'm also sure that there must be a nicer way to get the path to the addon/pods/components directory which doesn't need the special case for when you aren't developing an addon and also works with a different podModulePrefix...
This addon doesn't support usage inside of addons right now and I don't have the time to investigate it at the moment. I believe there were some issues inside of Ember-CLI itself that prevented me from getting it working.
I am generating an addon which relies on
ember-component-css
. I would like to be able to generate component styles for the components provided by my addon (e.g. the components inaddon/pods/components
). However, these styles don't seem to be compiled and the component doesn't get it'sclassName
adjusted.I tried adding the
scss
file to the corresponding file inapp/pods/components
and this works correctly when developing the addon. When the addon is installed into another app it fails, however.I came across #54 when investigating and I wasn't clear if this was the same issue?
Is my use-case supported? Is there a way that I can opt into it (maybe merging the relevant files from the addon into the app in
treeFor
?)?Thanks!
The text was updated successfully, but these errors were encountered: