I am using Gulp v3.9.1, and have run across a gulpfile that is using a syntax that is foreign to me. None of the tasks with this syntax will run.
gulp.task ('serve', [ 'js.lint', 'test' ], () => {
onError = eatError;
browserSync.init ({
ui: false,
files: [
'index2.html',
'tpl/**/*',
opts.srcDir + '/assets/img/**/*',
opts.srcDir + '/assets/less/**/*',
opts.srcDir + '/app/**/*',
opts.testDir + '/**/*',
'src/main/coverage/**/*'
],
proxy: {
target: "localhost:8080",
proxyOptions: {
xfwd: true
}
}
});
gulp.watch ([ 'gulpfile.js', opts.srcDir + '/app/**/*', opts.testDir + '/**/*' ], [ 'js.lint', 'test' ]);
});
In particular, I am referring to the () =>
on the first line. That is what gulp is complaining about. That syntax looks a little similar to a CoffeScript gulpfile I found, but I am not sure what it is. The project using this gulpfile has a ton of packages, which I am sifting through right now to see if they have anything to do with this syntax. I want to know what the () =>
represents, and how to get tasks using this syntax to run.
() =>
withfunction()
) or run it through babel first.=>
actually is, not how to get it working in your environment. Vote retracted.() =>
meant... so the dup you pointed to isn't irrelevant since it does answer part of what I wanted to know.