I run watch task.
If I add or remove files from srites folder - gulp must run sprites task and create new sprites.
If set retina:true spritesmith need both images (.png and @2x.png) and also look at their dimensions.
If there is only one image, or 1x image has size 20*20 and 2x image has size 41*40 - spritesmith throw error and watch task breaks.
If add errorHandler to spritesmth stream (index.js, line 54) , we avoid this:
var gulpSpriteStream = spritesmith(options)
.on('error', function (err) {
console.log(err)
})
I think it's be better if we will use chalk for painted error message in red.
Hi!
My case:
I run
watch
task. If I add or remove files from srites folder - gulp must runsprites
task and create new sprites.If set
retina:true
spritesmith need both images (.png
and@2x.png
) and also look at their dimensions. If there is only one image, or 1x image has size20*20
and 2x image has size41*40
- spritesmith throw error andwatch
task breaks.If add errorHandler to spritesmth stream (index.js, line 54) , we avoid this:
I think it's be better if we will use chalk for painted error message in red.