Can the grunt watch be restarted when ever there is a change in grunt.js file
use case: I am right now in the process of building my grunt process and keep changing the grunt.js file and I have to restart the grunt.js to see if it works.
Can the grunt watch be restarted when ever there is a change in grunt.js file
use case: I am right now in the process of building my grunt process and keep changing the grunt.js file and I have to restart the grunt.js to see if it works.
It looks like this was implemented in version
0.4.0
. You can see the issue here which explains that by simply watching the Gruntfile (even without any tasks) the entire contents of the Grunt setup will be reloaded:Yes you can achieve it. For example add
Gruntfile.js
to your files array.This default behaviour is to reload only when the
Gruntfile
changes.If you want to reload when an other files change you can use the option
reload
:Source : https://github.com/gruntjs/grunt-contrib-watch/pull/285