1.0.1 • Published 2 years ago

@figma-extractor/svgo-optimize v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

@figma-extractor/svgo-omptimize

Wrapper around svgo

import { svgoOptimize } from '@figma-extractor/svgo-optimize'

nodes
    .map((node) => svgoOptimize(node))
    .forEach((node) => {
        // node.content overwritten with result of optimization
    })

Exports

  • svgoOptimize(node: Node, plugins: svgo.Plugin[] = defaultPlugins)
  • defaultPlugins: modification of preset-default with removeViewBox turned off
  • currentColorPlugin: replaces fill and stroke with currentColor. Useful for inlined single-colored icons
1.0.1

2 years ago

1.0.0

2 years ago