Update grunt.event.on
function signature
Some newcomers as I was, tried to identify the subtask, and didn't know how, even if the *Using the watch event* showed this.
This commit is contained in:
parent
7f8cf80a6d
commit
d40f139501
@ -324,7 +324,7 @@ grunt.initConfig({
|
||||
});
|
||||
|
||||
// On watch events configure jshint:all to only run on changed file
|
||||
grunt.event.on('watch', function(action, filepath) {
|
||||
grunt.event.on('watch', function(action, filepath, target) {
|
||||
grunt.config('jshint.all.src', filepath);
|
||||
});
|
||||
```
|
||||
@ -339,7 +339,7 @@ var onChange = grunt.util._.debounce(function() {
|
||||
grunt.config('jshint.all.src', Object.keys(changedFiles));
|
||||
changedFiles = Object.create(null);
|
||||
}, 200);
|
||||
grunt.event.on('watch', function(action, filepath) {
|
||||
grunt.event.on('watch', function(action, filepath, target) {
|
||||
changedFiles[filepath] = action;
|
||||
onChange();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user