A SVG sprite file generator
Last updated a year ago by flyke .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @flyke/svg-sprite-generator 
SYNC missed versions from official npm registry.


Unlike similar Gulp or Grunt tools, our SVG sprite generator is created for designers who are not fond of coding. This tool simply takes a list of SVG files and make a single sprite file using <symbol> elements.

SVG sprite generator is a helpful for creating icon systems.

NOTICE: this is just a fork of https://github.com/frexy/svg-sprite-generator because I needed an updated version of the required of cheerio package to fix an npm audit issue. Whenever this issue is resolved: https://github.com/frexy/svg-sprite-generator/issues/10 you should use frexy/svg-sprite-generator instead of this one (flyke/svg-sprite-generator).


This program needs Node.js to run. If Node already existed in your system, use npm to install the generator:

npm install -g svg-sprite-generator


From a directory

Generate sprite from a directory of SVG files

svg-sprite-generate -d path/to/directory/of/svg/files -o path/to/sprite.svg

From a list of SVG files

Or specify SVG files to generate from. File paths can be separated with a comma.

svg-sprite-generate -l path/to/file1.svg,path/to/file2.svg -o path/to/sprite.svg

From a CSV file

Or use a CSV file. The first column contains symbol IDs, the second contains SVG file paths.

duo-alarm-clock, test/svg/duo-alarm-clock.svg
duo-bicycle, test/svg/duo-bicycle.svg

The command

svg-sprite-generate -c path/to/csv.csv -o path/to/sprite.svg

From another sprite file

You can take another sprite file and generate a new one with some modification too.

svg-sprite-generate -s path/to/sprite.svg -l path/to/extra.svg,path/to/another-extra-one.svg -o new-sprite.svg


SVG Sprite Generator is created by the folks at SmartIcons



Current Tags

  • 0.0.7                                ...           latest (a year ago)

1 Versions

  • 0.0.7                                ...           a year ago
Maintainers (1)
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dependencies (4)
Dev Dependencies (2)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |