Add Ability to Ignore Files/Folders#638
Merged
Ffloriel merged 9 commits intoFullHuman:masterfrom Mar 14, 2021
bdkjones:master
Merged
Add Ability to Ignore Files/Folders#638Ffloriel merged 9 commits intoFullHuman:masterfrom bdkjones:master
Ffloriel merged 9 commits intoFullHuman:masterfrom
bdkjones:master
Conversation
added 8 commits
February 28, 2021 18:37
Adds support for the "ignore" option of the glob dependency to prevent PurgeCSS from scanning specific folders (such as node_modules, etc.)
Add description for new "skippedlist" option
Replaced "skiplist" with "skippedContentGlobs" and changed the type to Array<String>
Replaced "skiplist" with "skippedContentGlobs" and changed the type to Array<String>
test for "skippedContentGlobs" added, casing on 'string' type fixed. Test passes, but only with full path to file to skip right now.
# Conflicts: # packages/postcss-purgecss/src/types/index.ts # packages/purgecss/src/types/index.ts
Minor documentation tweaks
Ffloriel
previously approved these changes
Mar 14, 2021
Ffloriel
approved these changes
Mar 14, 2021
Member
|
Thanks @bdkjones |
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 adds a new option:
SkippedContentGlobsthat allows users to tell PurgeCSS to NOT scan certain files/folders. The primary use-case is to avoid scanningnode_modulesand similar folders. The reason this option is needed is thatglob(the dependency) dropped support for the old negation operator!.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
The discussion can be found in #620
Note: This PR adds support for PurgeCSS itself and the PostCSS binding. It does not expose the option in all the other bindings because, well, I don't use them.
Note2: I'm not a TypeScript guy, so I highly suggest someone look over my work carefully and assume I've done stupid things.