Compression
- Just remove whitespace from a file
- Run a single plugin
- Disable one or more default plugins
- Round decimal values
- Change the default options for a plugin
Use preset-none
. For example:
npx svgo-ll --preset none -i test.svg
Use preset-none
and --enable
. For example:
npx svgo-ll --preset none --enable minifyPathData -i test.svg
Use the --disable
command line option. For example:
npx svgo-ll --disable minifyPathData cleanupIds -i test.svg
Rounding is not enabled by default. To enable the rounding plugin, use the --enable
command line option. For example, to add rounding to the default plugins:
npx svgo-ll -i test.svg --enable round
You can change the default options for a plugin by creating a JSON file and using the --options
command line option. For example, to use the default plugins and specify an id that should not be changed by the cleanupIds
plugin, create file named options.json
with the content:
{
"cleanupIds": {
"preserve": "abc"
}
}
and use the command:
npx svgo-ll -i test.svg --options options.json