cleanup-svg-icons
v1.0.5
Published
Clean up SVGs to be actually usable as icons
Readme
cleanup-svg-icons
Clean up SVGs to be actually usable as icons
Install
npm install -g cleanup-svg-iconsUsage
: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
currentColorso the parent can be used for styling - Make sure that
fill: noneis working whenfill: currentColoris on the parent
