I am trying to concatinate multiple files using gulp and gulp-concat modules of npm.
The following is the code snippet I have used.
gulp.src(['../a.js', '../b.js', '../c.js'])
.pipe(concat('destination.js'))
.pipe(gulp.dest('destination/path/'))
.on('error', () => {
console.error('Error');
})
.on('finish', () => {
console.log('Success');
});
The error event listener is not getting triggered when the file for suppose b.js or anyother is not found in the specified path.
The event finish is getting triggered anyway.
How do find error such as file not found in this process?
Thanks for the help in advance