Skip to content

[WIP] Simple tool to run a command when a file changes for tsx watch

License

Notifications You must be signed in to change notification settings

jellydn/tsx-watch

Repository files navigation

Welcome to tsx-watch 👋

Simple tool to run a command when a file changes for tsx watch

Usage

Install

npx jsr add @jellydn/tsw-watch

More usage at @jellydn/tsw-watch - JSR

Run file and automatically rerun on changes:

tsx-watch ./file.ts

Ignore files from watch

To exclude files from being watched, pass in a path or glob to the --ignore flag:

tsx-watch --ignore ./ignore-me.js --ignore ./ignore-me-too.js ./file.ts

Re-run command on change

tsx-watch --on-change "npm run build" ./file.ts

Pre-commit

This package also provides a pre-commit hook that will run the biome command before committing.

pre-commit install --hook-type pre-push

Author

👤 Huynh Duc Dung

Show your support

Give a ⭐️ if this project helped you!

kofi paypal buymeacoffee