mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: clarify behavior of --watch-path and --watch flags
Fixes: https://github.com/nodejs/node/issues/58113 PR-URL: https://github.com/nodejs/node/pull/58136 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Co-authored-by: Tierney Cyren <accounts@bnb.im>
This commit is contained in:
committed by
Juan José Arboleda
parent
f5ac35ee15
commit
0d3e1b3985
@@ -3080,6 +3080,10 @@ Use `--watch-path` to specify what paths to watch.
|
||||
This flag cannot be combined with
|
||||
`--check`, `--eval`, `--interactive`, or the REPL.
|
||||
|
||||
Note: The `--watch` flag requires a file path as an argument and is incompatible
|
||||
with `--run` or inline script input, as `--run` takes precedence and ignores watch
|
||||
mode. If no file is provided, Node.js will exit with status code `9`.
|
||||
|
||||
```bash
|
||||
node --watch index.js
|
||||
```
|
||||
@@ -3107,6 +3111,9 @@ combination with `--watch`.
|
||||
This flag cannot be combined with
|
||||
`--check`, `--eval`, `--interactive`, `--test`, or the REPL.
|
||||
|
||||
Note: Using `--watch-path` implicitly enables `--watch`, which requires a file path
|
||||
and is incompatible with `--run`, as `--run` takes precedence and ignores watch mode.
|
||||
|
||||
```bash
|
||||
node --watch-path=./src --watch-path=./tests index.js
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user