Reputation: 3746
I am using gulp.js. But I want to add a condition that if request.debug = true; in any of my js file then gulp task should fail. I have found gulp-if and gulp-fail that I can use for this purpose but I don't know that how can I check the specific condition? Thanks
Upvotes: 0
Views: 904
Reputation: 3994
You could use the gulp-contains module. If the condition provided to the contains function is true, an error is thrown.
gulp.task('default', function () {
gulp.src('src/**/*.js')
.pipe(contains('request.debug = true;'));
});
Upvotes: 1