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

CLI option to disable plugins is no longer available #1622

Closed
leonid-chernyavskiy opened this issue Nov 17, 2021 · 2 comments · May be fixed by #1977
Closed

CLI option to disable plugins is no longer available #1622

leonid-chernyavskiy opened this issue Nov 17, 2021 · 2 comments · May be fixed by #1977

Comments

@leonid-chernyavskiy
Copy link

Describe the bug
CLI option to disable plugins is no longer available. It makes at least one (hah, probably many) developer sad.

To Reproduce
Steps to reproduce the behavior:

  1. Go to console
  2. Type svgo --disable=removeViewBox some.svg
  3. Press enter
  4. See error - unknown option

Expected behavior
Simple working option to remove some plugin by choice. And not removing functionality with an update.

Screenshots
svgo --disable=removeViewBox draft.svg
error: unknown option '--disable=removeViewBox'

Desktop (please complete the following information):

  • SVGO Version [2.8.0]
  • NodeJs Version [12.22.7]
  • OS: [windows 10]

Additional context
So sad.

@TrySound
Copy link
Member

TrySound commented Nov 17, 2021

It was removed in major release. So not a bug.
https://github.com/svg/svgo/releases/tag/v2.0.0

I consider adding it back at some point but it should be able to work with presets somehow. This is still need to be figured out.

You can setup all necessary plugins with svgo.config.js

wojtekmaj added a commit to wojtekmaj/svgo that referenced this issue Apr 8, 2024
Closes svg#1356
Closes svg#1622

In svg#1622 (comment) we read:

> I consider adding it back at some point but it should be able to work with presets somehow. This is still need to be figured out.

I believe that adding it at the very last possible moment, AFTER initial list is resolved, will make it work with presets, and preserve the original behavior if the options aren't used at all.

I've also increased JSDoc coverage here, mainly for my own sanity when working with these arrays of plugins. Hope you don't mind that scope creep :)
wojtekmaj added a commit to wojtekmaj/svgo that referenced this issue Apr 8, 2024
Closes svg#1356
Closes svg#1622

In svg#1622 (comment) we read:

> I consider adding it back at some point but it should be able to work with presets somehow. This is still need to be figured out.

I believe that adding it at the very last possible moment, AFTER initial list is resolved, will make it work with presets, and preserve the original behavior if the options aren't used at all.

I've also increased JSDoc coverage here, mainly for my own sanity when working with these arrays of plugins. Hope you don't mind that scope creep :)
@SethFalco
Copy link
Member

Closing as a duplicate of #1356 which has more context/information.

@SethFalco SethFalco closed this as not planned Won't fix, can't repro, duplicate, stale Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants