@shanzhai/minify-svg-step
TypeScript icon, indicating that this package has built-in type declarations

0.0.16 • Public • Published

@shanzhai/minify-svg-step Continuous Integration License FOSSA Status Renovate enabled npm npm type definitions

A Shanzhai step which minifies a SVG file.

Usage

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()
);

Configuration Notes

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.

Dependencies

This package has the following runtime dependencies:

Name Version
svgo 2.8.0

Peer Dependencies

This package has no runtime peer dependencies (it does not expect any other packages to be installed alongside itself).

License

FOSSA Status

Readme

Keywords

none

Package Sidebar

Install

npm i @shanzhai/minify-svg-step

Weekly Downloads

1

Version

0.0.16

License

MIT

Unpacked Size

12.1 kB

Total Files

5

Last publish

Collaborators

  • jameswilddev