mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
watchexec: add page (#4061)
This commit is contained in:
parent
0209f9021c
commit
a5eca83cca
1 changed files with 20 additions and 0 deletions
20
pages/common/watchexec.md
Normal file
20
pages/common/watchexec.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# watchexec
|
||||
|
||||
> Run arbitrary commands when files change.
|
||||
> More information: <https://github.com/watchexec/watchexec>.
|
||||
|
||||
- Call `ls -la` when any file in the current directory changes:
|
||||
|
||||
`watchexec -- {{ls -la}}`
|
||||
|
||||
- Run `make` when any JavaScript, CSS and HTML files in the current directory change:
|
||||
|
||||
`watchexec --exts {{js,css,html}} make`
|
||||
|
||||
- Run `make` when any file in the `lib` or `src` subdirectories change:
|
||||
|
||||
`watchexec --watch {{lib}} --watch {{src}} {{make}}`
|
||||
|
||||
- Call/restart `my_server` when any file in the current directory change, sending `SIGKILL` to stop the child process:
|
||||
|
||||
`watchexec --restart --signal {{SIGKILL}} {{my_server}}`
|
Loading…
Add table
Reference in a new issue