gulp-svg2json-spritesheet
Using this plugin, you'll be able to compress SVGs into a JSON spritesheet file.
based on https://github.com/gurmukhp/gulp-svg-json-spritesheet.git
Install
$ npm install --save-dev gulp-svg2json-spritesheet
Usage
var gulp = ;var svg = ; gulp;
In the above example, all the SVGs in the image folder will be compressed and saved to compressed.json (sample output below).
Sample Output
images/svg/fireplace_00000.svg images/svg2/fireplace_00001.svg will result in
Options
basePath
basepath sets the part of the relative Path to be removed from the object key
API
gulp-svg2json-spritesheet(file,[options])
file
Type: string
Default: ``
sets the output filename
options.basepath
Type: string
Default: ``
sets the part of the relative Path to be removed from the object key
images/svg with "images" will result in svg
options.delim
Type: string
Default: -
sets the path delimiter
options.noExt
Type: bolean
Default: false
should the .svg extension be removed from rom the object key
License
MIT © flomair