1.0.5 • Published 4 years ago

cleanup-svg-icons v1.0.5

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

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

:warning: 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
1.0.5

4 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago