https://github.com/jellydn/tsx-watch
[WIP] Simple tool to run a command when a file changes for tsx watch
https://github.com/jellydn/tsx-watch
runner tsx typescript typescript-runtime
Last synced: 8 days ago
JSON representation
[WIP] Simple tool to run a command when a file changes for tsx watch
- Host: GitHub
- URL: https://github.com/jellydn/tsx-watch
- Owner: jellydn
- License: mit
- Created: 2024-04-09T14:00:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-08T22:54:26.000Z (7 months ago)
- Last Synced: 2024-12-08T23:27:20.965Z (7 months ago)
- Topics: runner, tsx, typescript, typescript-runtime
- Language: TypeScript
- Homepage: https://jsr.io/@jellydn/tsw-watch
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Welcome to tsx-watch 👋
> Simple tool to run a command when a file changes for [tsx watch](https://github.com/privatenumber/tsx#watch-mode)
## Usage
### Install
```sh
npx jsr add @jellydn/tsw-watch
```More usage at [@jellydn/tsw-watch - JSR](https://jsr.io/@jellydn/[email protected])
### Run file and automatically rerun on changes:
```sh
tsx-watch ./file.ts
```### Ignore files from watch
To exclude files from being watched, pass in a path or glob to the --ignore flag:```sh
tsx-watch --ignore ./ignore-me.js --ignore ./ignore-me-too.js ./file.ts
```### Re-run command on change
```sh
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.
```sh
pre-commit install --hook-type pre-push
```## Author
👤 **Huynh Duc Dung**
- Website: https://productsway.com/
- Twitter: [@jellydn](https://twitter.com/jellydn)
- Github: [@jellydn](https://github.com/jellydn)## Show your support
Give a ⭐️ if this project helped you!
[](https://ko-fi.com/dunghd)
[](https://paypal.me/dunghd)
[](https://www.buymeacoffee.com/dunghd)