gulp.task('js', function () {
return gulp.src(['public/js/**/*.js','public/js/*.js'])
.pipe(ngmin())
.pipe(uglify())
.pipe(concat('app.js'))
.pipe(gulp.dest('dist/public/js'));
});
I'm having an issue with this task and the error is:
[13:23:41] Using gulpfile ~/workspace/mean-blog/gulpfile.js
[13:23:41] Starting 'js'...
events.js:72
throw er; // Unhandled 'error' event
^
Error: Line 2: Unexpected token function
at throwError (/home/caio/workspace/mean-blog/node_modules/gulp-ngmin/node_modules/ngmin/node_modules/esprima/esprima.js:1156:21)
at throwUnexpected (/home/caio/workspace/mean-blog/node_modules/gulp-ngmin/node_modules/ngmin/node_modules/esprima/esprima.js:1209:13)
I think the problem is the paths, but i can not recognize the error.