calm-svg-sprite
v3.1.0
Published
Svg sprite generator
Downloads
81
Maintainers
Readme
CALM SVG SPRITE
Easily create optimized SVG sprites.
- Removes all styles and unnecessary attributes, optimizes, and adds the 'fill' property with the value 'currentColor' for more convenient further use.
- Creates a JavaScript file with an array containing the names of all icons, suitable for use in a UI kit.
Install
npm i -g calm-svg-sprite
Usage
calm-svg-sprite <source-files> <output-folder>
Example
calm-svg-sprite ./icons ./img
- Will automatically create files calm-sprite.svg and calmIcons.js in the /img folder.
API
source-files
Default: ./
output-folder
Default: ./