Skip to content
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

Add --exclude option to the CLI script #1392

Closed
Tokimon opened this issue Mar 1, 2021 · 1 comment
Closed

Add --exclude option to the CLI script #1392

Tokimon opened this issue Mar 1, 2021 · 1 comment

Comments

@Tokimon
Copy link
Contributor

Tokimon commented Mar 1, 2021

Is your feature request related to a problem? Please describe.
I run the SVGO recursively on a single folder (-r -f), but I have some auto generated SVG files that I for structural purposes have placed in a nested folder in the given folder. However since I know this file is already optimized there is no reason to use resources on parsing it (as well the risk of accidental clearing of the file as it is only symbols), so I would like to exclude them when executing.

I have look in the code (and documentation) and I have not been able to find any way to do this.

Describe the solution you'd like
An option to exclude certain files (--exclude or -e), possibly as regular or glob expression (eg --exclude "auto/.+\.svg")

Describe alternatives you've considered
I have considered building my own script that uses the SVGO module that parses the files I need. But that seems redundant, since all other options would be the same and thus a simple exclude in the CLI would be simpler.

Additional context
N/A

@TrySound
Copy link
Member

Fixed in https://github.com/svg/svgo/releases/tag/v2.3.0

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

No branches or pull requests

2 participants