diff options
author | Zac Echola <zac.echola@so.mnscu.edu> | 2014-07-28 18:50:04 +0400 |
---|---|---|
committer | Zac Echola <zac.echola@so.mnscu.edu> | 2014-07-28 18:50:04 +0400 |
commit | 2ba8e4e73f54d804522723e15b756fa3e98bd78b (patch) | |
tree | 06a91d89935226a6ca9586ba70a72ca5540a3ca8 /tasks | |
parent | ff2d7efc506c0e8ba2b2f4df907d617d8ff36ccd (diff) |
Simple stop on error
Closes #1
Diffstat (limited to 'tasks')
-rw-r--r-- | tasks/bootlint.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tasks/bootlint.js b/tasks/bootlint.js index 3bb6e5a..fc400e7 100644 --- a/tasks/bootlint.js +++ b/tasks/bootlint.js @@ -30,7 +30,7 @@ module.exports = function(grunt) { grunt.registerMultiTask('bootlint', 'An HTML linter for Bootstrap projects', function() { var options = this.options({ - stoponerror: true // not implemented yet... + stoponerror: false }); // Iterate over all specified file groups. @@ -52,7 +52,11 @@ module.exports = function(grunt) { totalErrCount += errs.length; errs.forEach(function (msg) { - grunt.log.warn(filepath + ':', msg.error); + if (options.stoponerror) { + grunt.fail.warn(filepath + ':' + msg.error); + } else { + grunt.log.warn(filepath + ':', msg.error); + } }); }); |