Skip to content

arc2898/watchdog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WatchDog

Watch files/dirs, trigger actions. Like entr but with config files and queuing.

Install

npm install -g @arc2898/watchdog

Usage

# Watch a directory and run a command on changes
watchdog ./src --command "npm run build"

# Watch specific file types
watchdog ./src --pattern "*.ts" --command "npm run build"

# Run without queueing (parallel)
watchdog ./src --command "npm test" --no-queue

# Use {file} placeholder for the changed path
watchdog ./src --command "eslint {file}"

Options

  • -c, --command <cmd> — Command to run (required)
  • -p, --pattern <glob> — File pattern (default: **/*)
  • -d, --delay <ms> — Debounce delay (default: 500ms)
  • -q, --queue — Queue commands instead of parallel (default: true)
  • -v, --verbose — Verbose output (default: true)

Config File

Create watchdog.config.json:

{
  "watch": "./src",
  "pattern": "*.ts",
  "command": "npm run build",
  "delay": 300,
  "queue": true
}

Then run: watchdog --config watchdog.config.json

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors