mirror of
https://github.com/go-task/task.git
synced 2026-07-02 08:58:41 +00:00
feat(watcher): migrate to fsnotify (#2048)
This commit is contained in:
@@ -2285,9 +2285,11 @@ With the flags `--watch` or `-w` task will watch for file changes and run the
|
||||
task again. This requires the `sources` attribute to be given, so task knows
|
||||
which files to watch.
|
||||
|
||||
The default watch interval is 5 seconds, but it's possible to change it by
|
||||
either setting `interval: '500ms'` in the root of the Taskfile or by passing it
|
||||
as an argument like `--interval=500ms`.
|
||||
The default watch interval is 100 milliseconds, but it's possible to change it
|
||||
by either setting `interval: '500ms'` in the root of the Taskfile or by passing
|
||||
it as an argument like `--interval=500ms`.
|
||||
This interval is the time Task will wait for duplicated events. It will only run
|
||||
the task again once, even if multiple changes happen within the interval.
|
||||
|
||||
Also, it's possible to set `watch: true` in a given task and it'll automatically
|
||||
run in watch mode:
|
||||
|
||||
@@ -733,7 +733,7 @@
|
||||
"$ref": "#/definitions/run"
|
||||
},
|
||||
"interval": {
|
||||
"description": "Sets a different watch interval when using `--watch`, the default being 5 seconds. This string should be a valid Go duration: https://pkg.go.dev/time#ParseDuration.",
|
||||
"description": "Sets a different watch interval when using `--watch`, the default being 100 milliseconds. This string should be a valid Go duration: https://pkg.go.dev/time#ParseDuration.",
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]+(?:m|s|ms)$"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user