Skip to content

Conversation

@simbo
Copy link

@simbo simbo commented Jun 6, 2018

Nice plugin! But i need more granular options than just filesize... :)

This implements the ability to work with glob patterns.

New Options:

  • glob - an array of glob patterns to delete (see micromatch). If glob array is not empty, minBytes will be ignored.
  • globOptions - optional options for glob
  • ignore - an array of glob patterns to exclude from deletion (can be used together with minBytes)
  • ignoreOptions - optional options for ignore

@simbo
Copy link
Author

simbo commented Jun 16, 2018

Please let me know, if you are planning to merge this or not. Or if you have any remarks or wishes for changes.

I need this functionality published and would like to avoid to create a second plugin, that does almost the same as yours.

(I can also help you with setting up travis for automated npm releases, if you are looking for a more time-saving and convenient workflow.)

@AnujRNair
Copy link
Owner

Hi @simbo - thanks for the PR, and apologies for the delay!

Although an excellent idea, I think this extra functionality is actually outside of the scope of this plugin - I'm wary about making a 'mega' plugin which has all options possible to clean up in multiple different ways.

I would suggest maybe removing the asset size code, and publishing your changes under a different plugin - I'm sure others would find it useful too!

Apologies for the delay again, and thanks for the contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants