3 December, 2015
0 Comments
1 category
If you want to jshint all JavaScript files in a folder, but want to exclude a subfolder, you can use “negation” in gulp.
var gulp = require("gulp");
var jshint = require("gulp-jshint");
var plumber = require("gulp-plumber");
var onError = function (err) {
console.log(err);
};
/**
* Hint all of our custom developed Javascript files.
*/
gulp.task("jshint", function () {
return gulp.src([
"Client/**/*.js",
"!Client/Libraries/**/*.js"
])
.pipe(plumber({
errorHandler: onError
}))
.pipe(jshint())
.pipe(jshint.reporter("default"));
});
Tags: GulpJavascript
Category: Uncategorized