-
Notifications
You must be signed in to change notification settings - Fork 6
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
Predictable imports order #138
Conversation
Codecov Report
@@ Coverage Diff @@
## master #138 +/- ##
==========================================
+ Coverage 91.56% 93.56% +1.99%
==========================================
Files 2 4 +2
Lines 83 233 +150
Branches 20 46 +26
==========================================
+ Hits 76 218 +142
- Misses 7 15 +8
Continue to review full report at Codecov.
|
@geelen @markdalgleish @sokra @joshwnj in case you have some time, please, take a look into it. Since this module is commonly used, the changes can be a bit breaking for the existing projects :) thanks |
} | ||
|
||
const processor = postcss.plugin('modules-extract-imports', function (options = {}) { | ||
const failOnWrongOrder = options.failOnWrongOrder; |
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.
Not sure about the option's name failOnWrongOrder
. In case you have a better variant — tell me.
The purpose of it is to warn a user if he made a dependency order which isn't possible to resolve properly:
.a {
composes: aa from './aa.css';
composes: bb from './bb.css';
}
.b {
composes: bb from './bb.css';
composes: aa from './aa.css';
}
Up! |
Not that it matters but a huge 👍 from me, adding a dependency graph to imports in |
I hope that smone can ship it since I don't any permission to publish the package |
b629380
to
ed63ddc
Compare
This looks fine to me. I am a little worried that it might very subtly break the resulting CSS for some existing users, so I think it might make sense to publish this under a dist-tag to give it some real-world testing before turning it on for everyone? |
dist-tag would be fine |
A small attempt of mine to make a proper dependency resolution for the case #131: