Referência rápida

Watchexec: Monitoramento de arquivos e reinicialização automática

Guia de referência rápida para Watchexec: monitoramento de extensões, flags de reinício e limpeza de tela, debouncing e exclusões.

· Publicado

Installation

macOS via Homebrew

brew install watchexec

Via Cargo (Rust)

cargo install watchexec-cli

Precompiled binaries for Linux and Windows are available from the Watchexec GitHub Releases.

Getting Started

# Run npm test whenever .js or .jsx files change
watchexec --exts js,jsx -- npm test
# Watch specific directories lib/ and test/
watchexec -w lib -w test -- npm test

Options & Flags

Flags

Flag Description
-c, --clear Clear screen before executing command
-r, --restart Restart process if it is still running

Options

Option Description
-s, --signal SIGKILL Signal sent to terminate existing process
-d, --debounce MS Debounce interval in milliseconds
-e, --exts EXTS Comma-separated list of file extensions
-i, --ignore PATTERN Ignore file or directory patterns
-w, --watch PATH Watch specific files or directories

References

Temas relacionados