-
-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gulp.spritesmith can't work with images created dynamically #53
Comments
This is caused by the underlying architecture of That being said, the current error message is definitely cryptic and we should error out when we see a stream instead. Additionally, it would be nice to support streaming on those select engines that could (e.g. pixelsmith, canvassmith via data URIs maybe). For your case, I suggest using a workaround for now: // Define a task to convert SVGs to PNGs
gulp.task('convert-svg2png', function () {
return gulp.src('.src/sprites/somePicture.svg')
.pipe(gulp.dest('tmp/svg2png/'));
});
// Define our sprite task which is dependant on SVGs being converted to PNGs
gulp.task('sprite', ['convert-svg2png'], function () {
var spriteData = gulp.src('tmp/svg2png/*.png')
.pipe(spritesmith({
imgName: 'sprite.png',
cssName: 'sprite.css'
}));
});
|
Thank you. I will do it this ways. It is not cool, but there is no choice. |
I had the same problem. |
We have finally resolved this issue. In For upgrading instructions, please see our "Breaking changes" notes in the README. Thank you for reporting the initial issue =) https://github.com/twolfson/gulp.spritesmith/tree/5.0.0#breaking-changes-in-500 |
Thank you! |
🎉 |
Gulp.spritesmith should open input images from stream but it tries to open them from disk. For example, this:
Causes error:
Error: ENOENT, open './src/sprites/somePicture.png'
.The text was updated successfully, but these errors were encountered: