Closed qlaffont closed 6 years ago
This issues is really vague. But one of the devs on my team added this plugin to our build process. Unfortunately it breaks when there are no images to be processed. This plugin runs on our watch tasks and when we first start a project we won't have images to be processed. But we still need our JS & Postcss to be processed. I've tried playing with the error & silent configuration options with no effect.
Error: Available images do not match the following config:
- `*`
Hi @qlaffont @mikemcguire
It seems errorOnUnusedConfig
option should solve the problem. https://github.com/mahnunchik/gulp-responsive#erroronunusedconfig
@mahnunchik - I tried both the errorOnUnusedConfig
and silent
options but neither seemed to fix the issue.
I ended up adding an error handler and that at least catches the error so it doesn't kill the process completely.
return gulp.src(SRC)
.pipe(responsive({
'*': {
width: '50%',
height: '50%',
}
}).on('error', function (err) {
gutil.log('No matching images found in source: ' + SRC, '');
}))
.pipe(rename(function (path) {
path.basename = path.basename.replace(/(@2x)/g, '');
}))
.pipe(gulp.dest(DEST));
Hi @lstanard
You may try another options: https://github.com/mahnunchik/gulp-responsive#options
The options 'errorOnUnusedImage: false' and 'silent: true' are not a solution. The bug persist.
Hi, I have a simple task but gulp bug when he doesn't found any file with .png :
Regards Quentin