-
-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to include nested addon/package sass in addon/styles/addon.scss for use in engine addon.scss #168
Comments
+1 |
@williamhector might be handy for you to provide an example app that you expect to work, describe the expected output. Then someone can work back, and ensure that it:
|
I tried to make an example project, but this is too long ago to remember the setup, and unfortunately I didn't keep any commits of my experiments, so I couldn't get the part that I previously said I could get working, to work. I was kind of flailing around trying lots of things, so I didn't have any expectations that anything would work, just hoping it would. I was hoping one of you guys with way more know-how than me could tell me if it was possible or not. The goal is to have:
For the purpose of sharing 3rd-party (bootstrap) sass variables among multiple engines while keeping the engines' styles lazy loaded. I settled for adding bootstrap to the root app, and in the root app's app.scss file, I am first importing the bootstrap sass files, then importing each of my engines app/styles/app.scss files, as opposed to dealing with addon/styles/addon.scss Note that while attempting to set up this example project, I noticed that a few days after I posted this issue, there was an update to the readme ( aee458a#diff-04c6e90faac2675aa89e2176d2eec7d8 ) which may or may not have helped. |
+1 |
#182 may be the same issue, with the parent addon as an in-repo addon. |
This is a complicated question that I've spent over a day and a half trying to figure out, and I have very little understanding of the way ember cli and broccoli work in the index.js file of an addon.
I have a project that includes a "core" in-repo-addon, and some in-repo-engines that consume their sibling core addon.
In the core addon, I'm using a nested addon (ember-sass-bootstrap), and am trying to provide access to the nested addon's sass variables and mixins to the engines in the engines' addon/styles/addon.scss file instead of app/styles/app.scss, so that I can lazy load the engines' styles only when required. Putting the styles in app/styles/app.scss would require them to be imported into the parent app's app.scss, which I'm hoping to avoid.
I've learnt how to be able to import the core addon's addon/styles/addon.scss in my engines' addon/styles/addon.scss files and got that part working, but I can't figure out how to be able to import the sass files from core's nested addon into core's addon/styles/addon.scss file.
In core's index.js file, I've tried things like sassOptions-includePaths, treeForStyles, treeForParentAddonStyles, mergeTrees inside the "included" hook, etc.
I don't understand much of it, and am hoping someone can help me out.
The text was updated successfully, but these errors were encountered: