-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix SASS compilation issues #8013
Conversation
There are several ways add-on can add a style to the application: + create `app/styles` folder + create `addon/styles` folder + return a tree from `treeForStyles` hook Previously, some add-ons (when using `treeForStyles` hook) would return content under `app/styles`. That used to work before packager changes. Because there's no contract (interface) that Ember CLI provides when you return a tree from `treeForStyles` hook, packager treats it as an opaque tree and moves its contents later on the "right" place. It unfortunately creates scenarios as such: ``` the-best-app-ever/ styles/ app/ styles/ ``` where nested `app/styles` is a tree from an add-on. While I believe add-ons should return content under the "root" of the tree, we do need to support current behaviour w/o breaking anything. Useful links: + `app/styles` folder in [`ember-basic-dropdown`](https://github.com/cibernox/ember-basic-dropdown/tree/v1.0.3/app/styles) + `treeForStyles` hook in [`ember-cli-tailwind`](https://github.com/embermap/ember-cli-tailwind/blob/v0.6.1/index.js#L67) + `treeForStyles` hook in [`ember-bootstrap`](https://github.com/kaliber5/ember-bootstrap/blob/v0.11.3/index.js#L54)
let addons = this.addonTreesFor('styles'); | ||
|
||
let flatten = addons.map(tree => | ||
new Funnel(tree, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add comments in here about stuff to deprecate as people are doing things we don't want?
Merging (so we can get the release out), @twokul would you mind following up with the comments that @kellyselden mentioned? |
@rwjblue absolutely |
It still doesn't include addon styles that are imported from the app.import("app/styles/style.css") Note: It works if I move it to the |
@kanongil I don't think |
Yes, I realise that (and I have moved my styles), but it's not documented that way, and it's done in the wild. |
AFAIK |
There are several ways add-on can add a style to the application:
app/styles
folderaddon/styles
foldertreeForStyles
hookPreviously, some add-ons (when using
treeForStyles
hook) would returncontent under
app/styles
. That used to work before packager changes.Because there's no contract (interface) that Ember CLI provides when you return
a tree from
treeForStyles
hook, packager treats it as an opaque treeand moves its contents later on the "right" place. It unfortunately
creates scenarios as such:
where nested
app/styles
is a tree from an add-on.While I believe add-ons should return content under the "root" of the
tree, we do need to support current behaviour w/o breaking anything.
Useful links:
app/styles
folder inember-basic-dropdown
treeForStyles
hook inember-cli-tailwind
treeForStyles
hook inember-bootstrap