-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Remove layer(utilities) if imports contain @utility
#14738
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
Changes from all commits
36eb79d
3daabed
ce9a9cb
c5f0bca
02272ac
dcefc16
cf436c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -197,26 +197,26 @@ export class Stylesheet { | |
| * adjusting imports which is a non-trivial task. | ||
| */ | ||
| analyzeImportPaths() { | ||
| let convertablePaths: StylesheetConnection[][] = [] | ||
| let nonConvertablePaths: StylesheetConnection[][] = [] | ||
| let convertiblePaths: StylesheetConnection[][] = [] | ||
| let nonConvertiblePaths: StylesheetConnection[][] = [] | ||
|
|
||
| for (let path of this.pathsToRoot()) { | ||
| let isConvertable = false | ||
| let isConvertible = false | ||
|
|
||
| for (let { meta } of path) { | ||
| for (let layer of meta.layers) { | ||
| isConvertable ||= layer === 'utilities' || layer === 'components' | ||
| isConvertible ||= layer === 'utilities' || layer === 'components' | ||
| } | ||
| } | ||
|
|
||
| if (isConvertable) { | ||
| convertablePaths.push(path) | ||
| if (isConvertible) { | ||
| convertiblePaths.push(path) | ||
| } else { | ||
| nonConvertablePaths.push(path) | ||
| nonConvertiblePaths.push(path) | ||
| } | ||
| } | ||
|
|
||
| return { convertablePaths, nonConvertablePaths } | ||
| return { convertiblePaths, nonConvertiblePaths } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lol what a typo 🤣
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be fair,
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean same — it does make more sense. I guess I just wasn't thinking when I wrote it originally haha |
||
| } | ||
|
|
||
| [util.inspect.custom]() { | ||
|
|
||
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.
I think you can also skip stylesheets with parent stylesheets yeah?
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.
Ah wait not if the tailwind stuff is in a non-root stylesheet so maybe not.