Closed mm-purenet closed 8 years ago
Can you paste the names of all files resolved by ./images/**/*.png
?
gulp.src('./images/**/*.png').on('data', function logPath (file) { console.log(file.path); });
images\sprites\icon-fav.png images\sprites\form-checkbox.png images\sprites\btn-basket-add.png images\sprites\form-radio.png images\sprites\btn-search.png images\sprites\icon-bin.png images\sprites\icon-basket.png images\sprites\icon-tick.png images\sprites\form-checkbox-active.png images\sprites\form-radio-active.png images\sprites-retina\icon-fav@2x.png images\sprites-retina\form-radio@2x.png images\sprites-retina\icon-tick@2x.png images\sprites-retina\icon-bin@2x.png images\sprites-retina\btn-basket-add@2x.png images\sprites-retina\form-checkbox@2x.png images\sprites-retina\icon-basket@2x.png images\sprites-retina\form-checkbox-active@2x.png images\sprites-retina\form-radio-active@2x.png images\sprites-retina\btn-search@2x.png
The issue seems to be gulp is not loading the sprites
and sprites-retina
folder in the same order. We need the normal
and 2x
files to be loaded in the same order to resolve their pairings. Here are a few options:
gulp.src(['images\sprites\icon-fav.png', 'images\sprites\form-checkbox.png', 'images\sprites\btn-basket-add.png'/*, ... */])
mv images/sprites-retina/* images/sprites
gulp.src('./images/**/*.png').pipe(sort()).pipe(spritesmith(/* ... */))
I am experiencing the following issue with version 6.0.0:
I keep getting the following error when attempting to run the sprite task from my gulpfile:
It appears to be comparing 2 different files.
My gulp config for spritesmith is as follows:
This config works without any issues in version 5.0.1.