gruntjs/grunt-contrib-watch — pull request #293 by cgross (2014-02-24 16:10:47+00:00)
Title: Livereload option to not reload if tasks fail (fixes #84).  Also reload ...

...configured tasks before each run.

I have the same requirement as #84. I added an option `livereloadOnError`. If `false` the livereload will not be triggered if any task has problems.

Also, I have a need to dynamically configure the tasks associated with a watch in the watch event. So I made a small change to read the tasks after each file change instead of during initialization. This enables my use-case of being able to run a unit test associated with a changed file. Some files don't have unit tests and if you run contrib-jasmine w/o any tests, the task logs an error, and because of the first change, will prevent livereload from triggering.

Tests included.