1.0.7 • Published 9 years ago
easy-svg-store v1.0.7
easy-svg-store
No Fuzz SVG sprite generator. Just Specify the folder containing the SVG files!
- Generate SVG SPRITES from the command line!!
The result is a SVG sprite with the given filenames as ID in lowercase
Installation
npm install easy-svg-store
Usage as a component
var path = require('path');
var esvgs = require('easy-svg-store');
// The source folder with the svgs
var mySVGsFolder = path.join(__dirname, 'svgs');
// This will generate a SVG file called svgstore.svg and a HTML file svgstore.html
esvgs(mySVGsFolder, {
svgSpriteName: 'svgstore', // The desired file name
outputDirectory: __dirname, // Where you want to output the sprite
outputHtml: true // Do you want to generate a HTML file to see the result?
}
);
Usage from the command line
$ esvgs -h
Usage: esvgs [options]
Options:
-h, --help output usage information
-s, --sprite-name [name] The name for the generated sprite [default: svgstore.svg].
-i, --input [dir] The folder containing the svg files [default: THIS_FOLDER].
-o, --output [dir] The destination folder for the output [default: THIS_FOLDER].
-x, --html Generate a HTML example [default: false].