Skip to content

Watch Mode

chant includes a watch mode that monitors your source files and automatically re-runs on changes. Available on both build and lint commands.

Terminal window
chant build --watch
chant lint --watch
  1. File system monitoring — watches for file create, modify, and delete events
  2. Debouncing — changes are batched with a short debounce window
  3. Full re-runs — each batch of changes triggers a full rebuild or re-lint

Watch mode monitors all .ts files, with these exclusions:

Ignored PatternReason
node_modules/Dependencies don’t change during development
.chant/Generated types and metadata
Hidden directories (.*/).git/, editor configs, tool caches
*.test.ts, *.spec.tsTest files
Non-.ts filesOnly .ts files are watched
  • Large projects: Debouncing keeps re-runs efficient by batching rapid file saves
  • Terminal multiplexing: Run watch mode in one terminal pane and your editor in another