When running the final build step in GULP, I am trying to use uglify with a wildcard in the gulp.src, but seeing an error.
This works:
gulp.task('build', ['lint','karma','clean'], function () {
return gulp.src('./src/js/file.js')
.pipe(gulp.dest('./dist'))
.pipe(uglify())
.pipe(size())
.pipe(gulp.dest('./dist'));
});
But this doesn't:
gulp.task('build', ['lint','karma','clean'], function () {
return gulp.src('./src/js/*.js')
.pipe(gulp.dest('./dist'))
.pipe(uglify())
.pipe(size())
.pipe(gulp.dest('./dist'));
});
The only difference being that I select a specific file in the working gulp.src, but use a wildcard in the non-working version. I have narrowed this down to uglify() because if I comment it out, I don't get the error, and everything completes without issue.
Any help would be greatly appreciated
gulp.desttwice in the same pipeline? Does removing the first one solve the problem?gulp.dest. What's the error you're getting?events.js:85 throw er; // Unhandled 'error' eventwith all of the corresponding reference to differing lines in:events.js:85 throw er; // Unhandled 'error' event ^ /Users/andrewr/Development/viper-probe-droid/node_modules/gulp-uglify/node_modules/uglify-js/lib/parse.jssrc/jsfolder also?