A SVG sprite generator
Switch branches/tags
Nothing to show
Clone or download
Huy Nguyen Huy Nguyen
Huy Nguyen and Huy Nguyen Fix crash where file is not svg
Latest commit 4f0bd16 Jul 31, 2015
Permalink
Failed to load latest commit information.
bin add bin Jul 10, 2015
lib Fix crash where file is not svg Jul 31, 2015
src Fix crash where file is not svg Jul 31, 2015
test Fix crash where file is not svg Jul 31, 2015
.gitignore some progress and update README Jun 10, 2015
Gruntfile.js working condition Jul 9, 2015
LICENSE Initial commit Jun 9, 2015
README.md Update README.md Jul 29, 2015
package.json update readme Jul 18, 2015

README.md

svg-sprite-generator

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.

Installation

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

Usage

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

About

SVG Sprite Generator is created by the folks at SmartIcons

License

MIT