Skip to content

Latest commit

 

History

History
71 lines (46 loc) · 1.57 KB

faq.md

File metadata and controls

71 lines (46 loc) · 1.57 KB

FAQ

Compression

Compression

Just remove whitespace from a file

Use preset-none. For example:

npx svgo-ll --preset none -i test.svg

Run a single plugin

Use preset-none and --enable. For example:

npx svgo-ll --preset none --enable minifyPathData -i test.svg

Disable one or more default plugins

Use the --disable command line option. For example:

npx svgo-ll --disable minifyPathData cleanupIds -i test.svg

Round decimal values

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

Change the default options for a plugin

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