@wandiparis/gulp-sprite
v1.1.4
Published
Generate a sprite from a set of PNG icon files
Downloads
6
Readme
gulp-sprite
Gulp task that generates a sprite from a PNG icons directory.
Installation
npm install --save-dev @wandiparis/gulp-sprite
Usage
Use with default parameters :
// gulpfile.js
const sprite = require("@wandiparis/gulp-sprite");
const compile = sprite();
module.exports = {
compile
};
Use with custom parameters (see below for the full list) :
// gulpfile.js
const sprite = require("@wandiparis/gulp-sprite");
const compile = styles({
cssName: "my_sprite.scss",
scssDest: "path/to/dest",
});
module.exports = {
compile
};
Parameters
cssName
The name of the generated stylesheet.
Default value : '_sprite.scss'
imgPath
The path of the directory where to put the generated sprite image.
Default value : 'assets/img'
imgName
The name of the generated sprite image.
Default value : 'sprite.png'
dest
Default value : 'assets/scss/utils'
src
Default value : 'assets/img/icons/*.png'