Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rmoralp/easy-svg-sprite
From a bunch of icons in SVG to optimized SVG sprite. Perfect for icon libraries
https://github.com/rmoralp/easy-svg-sprite
Last synced: 10 days ago
JSON representation
From a bunch of icons in SVG to optimized SVG sprite. Perfect for icon libraries
- Host: GitHub
- URL: https://github.com/rmoralp/easy-svg-sprite
- Owner: rmoralp
- Created: 2019-02-17T22:19:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-02-23T22:32:53.000Z (over 5 years ago)
- Last Synced: 2024-03-25T07:03:13.419Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 45.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# easy-svg-sprite
This package has been created thinking about improving the creation of icons sprites.
A tool that takes a bunch of icons in SVG, optimizes them and generate a SVG sprite ready for use in your website as an icon library.
## Installation
```sh
npm install easy-svg-sprite
```## Usage
It takes all the .svg files in folder, optimize them and finally generate a sprite.
All the icons in the sprite has the prefix `icon-`, so an "arrow-left.svg" is going to become "icon-arrow-left"### CLI Options
```
Usage: easy-sprite [OPTIONS]Options:
--version : Version
-I INPUT, --input=INPUT : Input directory, where the .cvg icons are (by default ./icons directory)
-O OUTPUT, --output=OUTPUT : Output folder (by default the current path)
```### Examples
```sh
$ easy-sprite -I ./files -O ./dist
```## How can I use it in html?
```
```