Closed simaodeveloper closed 7 years ago
There seems to be a string being passed as the first parameter. The first parameter should be an object. The following should work:
gulp.task('sprite', function(){
var spriteData = gulp.src('./src/images/sprite/*.png')
.pipe(spritesmith({
imgName: 'sprite.png',
cssName: 'sprite.styl'
}));
var imgStream = spriteData.img.pipe(buffer()).pipe(gulp.dest('./src/styles/utils'));
var cssStream = spriteData.css.pipe(gulp.dest('./src/images'));
return merge(imgStream, cssStream);
});
my code:
error in console: