Answer the question
In order to leave comments, you need to log in
How to create multiple sprites in spritesmith?
So it goes.
I needed to have several different sprites in one project, but I can't figure out how to set up a spritesmith for this.
Answer the question
In order to leave comments, you need to log in
gulp.task( 'sprite', function () {
var spriteOne = gulp.src( 'sprite/*@1.png' ).pipe( spriteSmith() ),
spriteTwo = gulp.src( 'sprite/*@2.png' ).pipe( spriteSmith() );
spriteOne.img.pipe( gulp.dest( 'dest/img/one/' ) );
spriteTwo.img.pipe( gulp.dest( 'dest/img/two/' ) );
spriteOne.css.pipe( gulp.dest( 'dest/css/one/' ) );
return spriteTwo.css.pipe( gulp.dest( 'dest/css/two/' ) );
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question