cleanup-svg-icons

1.0.5 • Public • Published

cleanup-svg-icons

Build Status Coverage Status Greenkeeper badge

Clean up SVGs to be actually usable as icons

Install

npm install -g cleanup-svg-icons

Usage

⚠️ This modifies files in-place, please use version control or make a backup.

cleanup-svg-icons "/the/path/to/a/folder/or/any/glob/*.svg"

Internals

  • Optimize the SVG (merge paths, etc.)
  • Remove elements that are useless (e.g. <title>)
  • Remove attributes that are useless (e.g. id, data-*)
  • Make sure that class names are not colliding (e.g. AI always exports with cls-1, cls-2, etc.)
  • Replace hardcoded colors with currentColor so the parent can be used for styling
  • Make sure that fill: none is working when fill: currentColor is on the parent

Readme

Keywords

none

Package Sidebar

Install

npm i cleanup-svg-icons

Weekly Downloads

26

Version

1.0.5

License

MIT

Unpacked Size

15.5 kB

Total Files

11

Last publish

Collaborators

  • queicherius