hhvys / svg-analyzer

Analyze and optimise your SVG asset library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SVG Analyzer

npm (scoped)

Analyse your SVG assets library for saving those extra bytes and DOM nodes.

Supports:

  • Preview of all the assets
  • One click optimization with SVGO with the savings in bytes
  • Defing your SVG budget and see which files are above or below the threshold
  • DOM node count - if used in inline mode
  • Builds a single page website with all these stats

Usage

Usage: npx svgo-analyzer "--path-to-svg-assets" -o -n 88 -s 400

Options:
  -o, --optimize   Do SVGO optimization. Defaults to false
  -n, --nodes <n>  Nodes threshold. Defaults to 8
  -s, --size <n>   Size threshold in bytes. Defaults to 400 bytes
  -h, --help       output usage information

Screenshot

About

Analyze and optimise your SVG asset library


Languages

Language:JavaScript 52.5%Language:CSS 47.5%