cleanup-svg-icons
v1.0.5
Published
Clean up SVGs to be actually usable as icons
Downloads
318
Readme
cleanup-svg-icons
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 whenfill: currentColor
is on the parent