Open JoKalliauer opened 3 years ago
Hi. You need to install svgo locally like this npm i svgo
@TrySound I'd say we need the CLI README.md examples to show how to disable/enable plugins too :)
Only possible with config for now
Came here for a similar reason: after my weekly update I had a lot of CI builds failing with error: unknown option '--disable=removeViewBox'
.
The releases notes for 2.0.0 suggests that --disable/--enable
might be reimplemented in a later version, so I'll simply stick to svgo@1.3.2 in the meantime. The amount of configuration needed in 2.0.0 to simply disable one plugin seems a bit overkill in my case.
Came here because of this as well. Looks like there is no way to use svgo
if I just want to use it as a CLI program (without e.g. polluting local scope with node_modules
created from npm i svgo
). It's probably better to remove CLI usage at all then as it's so limited now.
Let me preface this by saying I do admire and appreciate the team's decision to, as a wise famous man once said: "Move Fast and Break Things"
However... I, too, was just bitten by the removal of the --enable=PLUGIN
CLI argument. :-(
I would vote that this issue be reopened, lest people inadvertently start creating duplicates. (I almost did!)
I would like the reimplementation of --enable=PLUGIN
-feature. (maybe I switch back to the buggy 1.3.2-version)
I had closed the issue, since I was able to solve the error, not meaning I'm anyhow happy with the solution/workaround.
Imho this bug-report/question is solved, but we should file a new feature-request. Since I do not know any duplicate/feature-request I reopen this issue for now, however it is up to the svgo-mebers how to proceed.
I used an old version of SVGO like e.g. comand
svgo -i input.svg -o output.svg --pretty --indent=1 -p 3 --enable=removeHiddenElems --disable=removeUnknownsAndDefaults
and I got
error: unknown option '--enable=removeHiddenElems'
However it seems svgo is not backwards compatible.
I have read #1329 and #1337/files, and do not understand what to do.
I have tried to copy svgo.config.js from https://github.com/svg/svgo/issues/1329#issuecomment-781585374 into the current folder and got