Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can the gruntjs watch be restarted on grunt.js file change

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.

like image 789
user3140435 Avatar asked Jan 03 '14 12:01

user3140435


People also ask

Which grunt plugin is used to run predefined tasks when the watched file changes?

grunt-este-watchby Daniel SteigerwaldRun predefined tasks whenever watched file changes.

What does grunt watch do?

This task will emit a watch event when watched files are modified. This is useful if you would like a simple notification when files are edited or if you're using this task in tandem with another task. Here is a simple example using the watch event: grunt.

What is grunt js file?

json file, which is then parsed to a JavaScript object. Grunt has a simple template engine to output the values of properties in the configuration object. Here we tell the concat task to concatenate all files that exist within src/ and end in .

What is grunt JS in node JS?

Grunt is a generic task-runner for Node. js projects with a huge library of plugins (grunt-contrib-*). By automating tasks, you can streamline processes for your project (and reduce human error on your team).


1 Answers

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:

watch: {
    grunt: { files: ['grunt.js'] }
}
like image 108
Jordan Kasper Avatar answered Oct 15 '22 02:10

Jordan Kasper