I am trying to run jscs using the following code.
var _files = ["main.js", "src/*.js"];
gulp
.src(_files)
.pipe(jscs(
{
configPath: __dirname+'/../.jscsrc',
esnext: true,
fix: true
}
))
.pipe(gulp.dest(''));
What should I pass in gulp.dest as I have files in two different directories?
"jscs -x dirName" individual works, but I am creating a generic gulp task which will run JSCS on all the folders and automatically fix the issues. And gulp.dest() only accepts one directory.
You need to use a forEach loop on the _files. Credit: gulp task to process files that are writable