Here is my code
gulp.task('js', function () {
return gulp.src(['public/js/angular.js','public/js/app.js', 'public/js/**/*.js'])
.pipe(plumber({
errorHandler: function(err){
console.log(err);
this.emit('end');
}
}))
.pipe(concat('filename.min.js'))
.pipe(uglify().on('error', gutil.log))
.pipe(gulp.dest('public/js') //destination of new file
.pipe(notify({ message: 'Finished minifying JavaScript'})))
gulp.task('watch', function(){
gulp.watch('app/assets/sass/**/*', ['css']);
gulp.watch('public/js/**/*', ['js']);
});
Console error after change made to any js file:
/projects/miche-web/public/js/miche.min.js: Unexpected token name «replace», expected punc «,»] message: '/Users/projects/miche-web/public/js/miche.min.js: Unexpected token name «replace», expected punc «,»', fileName: '/Users/projects/miche-web/public/js/miche.min.js', lineNumber: 247,
However, the file is blank so I can't reference an error on line 247.
Any thoughts?