A Shanzhai step which minifies a SVG file.
Within a trigger's event handler, return an instance of MinifySvgStep
similar to the following:
new MinifySvgStep(
`A description of the operation being performed`,
new AnInputOfUnminifiedSvg(),
new AnOutputOfMinifiedSvg()
);
The configuration used is highly aggressive. It should be reasonable for static SVGs.
- Coordinates are rounded to the nearest pixels.
- Colors are reduced from 24 to 12 bits.
- Ids, classes, etc. are all removed.
- Invisible elements are removed.
- Grouping elements which do not alter appearance are flattened.
This package has the following runtime dependencies:
Name | Version |
---|---|
svgo |
This package has no runtime peer dependencies (it does not expect any other packages to be installed alongside itself).