gulp-sprites-preprocessor
Sprites Preprocessor - Generate sprites from css file
$ npm install --save-dev gulp-sprites-preprocessor
var gulp = require('gulp');
var sprites = require('gulp-sprites-preprocessor');
gulp.task('default', function () {
return gulp.src('style.css')
.pipe(sprites({ name: 'sprite.png', path: 'images/sprites', prefix: '/images/sprites/' }))
.pipe(gulp.dest('dist'));
});
Type: String
Default: sprite.png
Name of the output sprite file.
Type: String
Default: images/sprites
Path to the source image files
Type: String
Default: /images/sprites/
Css prefix in image url to know what images transform into sprites