flashmon is a smart, dependency-aware file watcher for JavaScript and TypeScript projects. It is designed to be a faster and more efficient alternative to nodemon by only watching the files your application actually uses.
Traditional watchers like nodemon watch everything in your directory. flashmon is different:
- Dependency Tracking: It analyzes your code's AST to build a dependency graph.
- Selective Watching: It only watches the entry file and its local dependencies.
- Node Modules Aware: It automatically ignores
node_modules, keeping the watcher lean and fast. - Built with SWC: Uses super-fast Rust-based parsing for instantaneous dependency analysis.
Install it globally:
npm install -g flashmonSimply point flashmon to your entry file:
npx flashmon server.jsflashmon works seamlessly with TypeScript projects:
npx flashmon src/index.ts- Parse: flashmon uses SWC to parse your entry file.
- Graph: It recursively finds all
importandrequirestatements to build a dependency graph. - Watch: It uses
chokidarto watch ONLY the files in that graph. - Restart: When any of those files change, it kills the current process and restarts it instantly.
In our benchmarks, flashmon is consistently 30-50% faster than nodemon in detecting changes and restarting, especially in larger projects with many unused files.
ISC