Hey,
I'm trying to use the "prefix" option of the cleanupIDs plugin:
https://github.com/svg/svgo/blob/master/plugins/cleanupIDs.js#L10
Apparently it's not stated anywhere on how to provide options to plugins like this.
How do I do it using a config file?
How do I do it using the command line?
Thanks.
See about config.
So you need to provide your config in .yml file with content like this:
``` (yml)
plugins:
and run svgo with it like
svgo --config=yourconfig.yml
You can also provide a config in a command line like json:
svgo --config='{ "plugins": [ { "cleanupIDs": { "prefix": "foo" } } ] }'
```
Note: cleanupIDs doesn't work with SVG files containing <style> or <script> since svgo can't parse them.
Most helpful comment
So you need to provide your config in .yml file with content like this:
``` (yml)
plugins:
prefix: foo
svgo --config=yourconfig.yml
svgo --config='{ "plugins": [ { "cleanupIDs": { "prefix": "foo" } } ] }'
```
Note:
cleanupIDsdoesn't work with SVG files containing<style>or<script>since svgo can't parse them.