Skip to content
This repository was archived by the owner on Feb 1, 2020. It is now read-only.

added an option to specify 'only' as a selector for files to purge #4

Merged
merged 2 commits into from
Dec 18, 2017

Conversation

somebody32
Copy link
Contributor

Proposed changes

Added an option to have more fine-grained control over lists of assets purge runs.

Example:

new PurgecssPlugin({
  paths: glob.sync(`${PATHS.src}/*`),
  styleExtensions: ['.css']
  only: 'my_huge_css_to_purge'
  // or as an array: 
  // only: ['my_huge_css_to_purge', 'and_another_one']
})

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Further comments

I will change docs later if you think it is ok to have that option

@Ffloriel Ffloriel self-requested a review December 16, 2017 16:05
@Ffloriel
Copy link
Member

Thanks for the contribution.
I think it is ok to have the option. Can you provide an example in the examples folder to confirm the plugin works as expected? You can base yourself on the simple one.

@somebody32 somebody32 force-pushed the master branch 3 times, most recently from 2846dca to 747d59f Compare December 18, 2017 17:41
@somebody32
Copy link
Contributor Author

@Ffloriel done!

@Ffloriel Ffloriel merged commit 71c63ba into FullHuman:master Dec 18, 2017
@Ffloriel
Copy link
Member

Thanks for the PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants