Type object
File match watch.json
Schema URL https://catalog.lintel.tools/schemas/schemastore/grunt-watch-task/latest.json
Source https://www.schemastore.org/grunt-watch-task.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Properties

options object

One or more files to watch.

10 nested properties
spawn boolean

Whether to spawn task runs in a child process.

Default: true
interrupt boolean

As files are modified this watch task will spawn tasks in child processes.

Default: false
debounceDelay integer

How long to wait before emitting events in succession for the same filepath and status. For example if your Gruntfile.js file was changed, a 'changed' event will only fire again after the given milliseconds.

Default: 500
interval integer

The interval is passed to 'fs.watchFile'. Since 'interval' is only used by 'fs.watchFile' and this watcher also uses 'fs.watch'; it is recommended to ignore this option.

Default: 100
reload boolean

By default, if Gruntfile.js is being watched, then changes to it will trigger the watch task to restart, and reload the Gruntfile.js changes. When reload is set to true, changes to any of the watched files will trigger the watch task to restart. This is especially useful if your Gruntfile.js is dependent on other files.

Default: false
forever boolean

This is only a task level option and cannot be configured per target. By default the watch task will duck punch grunt.fatal and grunt.warn to try and prevent them from exiting the watch process. If you don't want grunt.fatal and grunt.warn to be overridden set the forever option to false.

Default: true
atBegin boolean

This option will trigger the run of each specified task at startup of the watcher.

Default: false
livereload boolean | number

If enabled a live reload server will be started with the watch task per target. Then after the indicated tasks have run, the live reload server will be triggered with the modified files.

Default: false
cwd string | object

Ability to set the current working directory.

livereloadOnError boolean

Option to prevent the livereload if the executed tasks encountered an error. If set to false , the livereload will only be triggered if all tasks completed successfully.

Default: true

Definitions

target object
files string[] required

One or more files to watch.

tasks string[]

One or more tasks to run.

options object

One or more files to watch.

10 nested properties
spawn boolean

Whether to spawn task runs in a child process.

Default: true
interrupt boolean

As files are modified this watch task will spawn tasks in child processes.

Default: false
debounceDelay integer

How long to wait before emitting events in succession for the same filepath and status. For example if your Gruntfile.js file was changed, a 'changed' event will only fire again after the given milliseconds.

Default: 500
interval integer

The interval is passed to 'fs.watchFile'. Since 'interval' is only used by 'fs.watchFile' and this watcher also uses 'fs.watch'; it is recommended to ignore this option.

Default: 100
reload boolean

By default, if Gruntfile.js is being watched, then changes to it will trigger the watch task to restart, and reload the Gruntfile.js changes. When reload is set to true, changes to any of the watched files will trigger the watch task to restart. This is especially useful if your Gruntfile.js is dependent on other files.

Default: false
forever boolean

This is only a task level option and cannot be configured per target. By default the watch task will duck punch grunt.fatal and grunt.warn to try and prevent them from exiting the watch process. If you don't want grunt.fatal and grunt.warn to be overridden set the forever option to false.

Default: true
atBegin boolean

This option will trigger the run of each specified task at startup of the watcher.

Default: false
livereload boolean | number

If enabled a live reload server will be started with the watch task per target. Then after the indicated tasks have run, the live reload server will be triggered with the modified files.

Default: false
cwd string | object

Ability to set the current working directory.

livereloadOnError boolean

Option to prevent the livereload if the executed tasks encountered an error. If set to false , the livereload will only be triggered if all tasks completed successfully.

Default: true
optionsWithEvents
eventType string

Specify the type watch event that trigger the specified task.

options object

One or more files to watch.

spawn boolean

Whether to spawn task runs in a child process.

Default: true
interrupt boolean

As files are modified this watch task will spawn tasks in child processes.

Default: false
debounceDelay integer

How long to wait before emitting events in succession for the same filepath and status. For example if your Gruntfile.js file was changed, a 'changed' event will only fire again after the given milliseconds.

Default: 500
interval integer

The interval is passed to 'fs.watchFile'. Since 'interval' is only used by 'fs.watchFile' and this watcher also uses 'fs.watch'; it is recommended to ignore this option.

Default: 100
reload boolean

By default, if Gruntfile.js is being watched, then changes to it will trigger the watch task to restart, and reload the Gruntfile.js changes. When reload is set to true, changes to any of the watched files will trigger the watch task to restart. This is especially useful if your Gruntfile.js is dependent on other files.

Default: false
forever boolean

This is only a task level option and cannot be configured per target. By default the watch task will duck punch grunt.fatal and grunt.warn to try and prevent them from exiting the watch process. If you don't want grunt.fatal and grunt.warn to be overridden set the forever option to false.

Default: true
atBegin boolean

This option will trigger the run of each specified task at startup of the watcher.

Default: false
livereload boolean | number

If enabled a live reload server will be started with the watch task per target. Then after the indicated tasks have run, the live reload server will be triggered with the modified files.

Default: false
cwd string | object

Ability to set the current working directory.

livereloadOnError boolean

Option to prevent the livereload if the executed tasks encountered an error. If set to false , the livereload will only be triggered if all tasks completed successfully.

Default: true