I just started to learn gulp
tasks for checking javascript files. I am using ASP.NET Core Web Application(.NET Framework)
project type.
I am trying to fails msbuild
when the gulp
task fails. Here is the task:
gulp.task('jshint', function () {
return gulp.src('./wwwroot/lib/test/js/**/*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(jshint.reporter("fail"));
});
Here is the only one javascript file with code:
LHG^(&^%(*&^%(*&)))
When I build the project(I binded to run task before build in the Task Runner Explorer
), the task generates errors in the Error List
tab. But I am getting:
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
in the Output
window. i came across this question Cancel Build if Task Runner Explorer Task Fails where it suggests to run the task from pre-build event, but the problem is this project type doesn't seem to have build
tab in its Properties
window. I suspect that it can be done via some json configuration file, but I can not find any related information.