Skip to content

yisibell/svgo-extra

Repository files navigation


svgo-extra

A collection of SVGO Plug-ins.

Features

  • Make SVG's color easy to change.
  • Make SVG's size responsive.
  • Create a suitable configuration for SVGO.

Installation

# pnmp
$ pnpm add svgo-extra

# yarn
$ yarn add svgo-extra

# npm
$ npm i svgo-extra

APIs

moveChildAttrToSVGElement

Create an SVGO plug-in that can move the attribute of the child node you specify to the svg node.

responsiveSVGSize

Create a SVGO plug-in that can make svg size responsive.

createSvgoConfig

Create a suitable configuration for SVGO, use preset-default config by default.