-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
Implementation of output-unused-css #763
Conversation
Seems like the Github CI tests are passing. So I'm going to assume the failing tests are caused by running on a windows machine. |
I did a test on a project im working on:
These added up:
So about |
@Ffloriel Can this get a review? I added tests and updated the documentation. I would like to discuss the API, plugin integrations and if more tests are needed. |
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.
Thanks for taking the time to take care of the most requested feature!
There's one little comment about the parent node not being in the rejected CSS but apart from that, LGTM!
Proposed changes
This PR implements an option to output the purged css alongside the regular output. This is a feature request mentioned in #131.
Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
Old comments
a few tests are failing because of Windows files paths. The tests fail because they check for./
seperators instead of\\
other tests are performance related. Not sure what is causing them to fail sometimes. Maybe my laptop is just a bit to slow to hit the 5 second threshold everytime? These changes should only have a performace penalty if the option is actually being used, but since they are off by default I can't see how they could.some tests are failing on these type of lines, I really don't get how these changes could have impacted those.the last test that is failing seems to choke on aJSON.parse
line. I'm checking to see if these changes have anything to do with it.I'm looking for feedback on:
What the CLI and programmatic API changes should look like. Currently itsrejectedCss
and--rejected-css
What the tests should look like, I'm not sure what the edge cases are that tests should cover in regard to this feature.The performance hit that will occur when enabling this feature.