Closed gmclelland closed 9 years ago
FYI...I just tried again with the latest version of node 4.1.0 and still the same error.
The retinaSrcFilter
isn't properly aligned with the filepaths to the source images. It should be a glob pattern which is consistent with the one used for gulp.src
. The following configuration should resolve the issue:
gulp.task('sprite-retina', function () {
var data = gulp.src('src/sprite-bitmap/*.png').pipe(plugins.spritesmith({
retinaSrcFilter: 'src/sprite-bitmap/*@2x.png',
imgName: 'sprite-bitmap.png',
retinaImgName: 'sprite-bitmap@2x.png',
cssName: '_sprite-bitmap.scss'
}));
var imgStream = data.img.pipe(gulp.dest(paths.bitmapsprite.dest));
var cssStream = data.css.pipe(gulp.dest(paths.bitmapsprite.dest));
// return merge(imgStream, cssStream);
});
That worked, thank you so much! It's 1:45am here and I've been trying to figure that out for a long time.
Hello, I'm trying to create a retina sprite with this gulp task:
When I run the task, it gives me this error:
I have copied these images from this repo into my folders: fork.png fork@2x.png github.png github@2x.png twitter.png twitter@2x.png
If I comment out these lines a non retina sprite is produced with the six images:
Any idea as to what is going on? I'm running gulp.spritesmith 4.1.0, npm 2.14.1, and node v0.12.7