Implementation of output-unused-css - #763
Merged
Merged
Conversation
Contributor
Author
|
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. |
Contributor
Author
|
I did a test on a project im working on: These added up: So about |
Closed
Contributor
Author
|
@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. |
Ffloriel
requested changes
Nov 22, 2021
Ffloriel
left a comment
Member
There was a problem hiding this comment.
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!
Ffloriel
approved these changes
Nov 26, 2021
Contributor
Author
6 tasks
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
xin the boxes that applyChecklist
Put an
xin 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.parseline. 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 itsrejectedCssand--rejected-cssWhat 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.