Ignore watch events for certain duration or when shell is executing
mez0ru opened this issue · 1 comments
I'm using cargo watch with other scripts.
For example, I need to run tailwindcss to execute when my rs files change because I use tailwindcss templating in rust.
But the problem is that when tailwindcss outputs the resulted css, the cargo detects this change and rerun again.
The best solution is to make it ignore watch events during execution. I use make to execute a lot of scripts together.
the command I use:
cargo watch -- make run
Makefile:
run:
bun dev
cargo run
The --delay
option unfortunately doesn't ignore changes files are being changed during the duration. I tried to increase it to 5 seconds but it only delays the actual execution, it will execute multiple times, since multiple commands are changing files.
Is there a feature that lets me do this?
Nevermind, I solved my problem using ignore pattern -i
to ignore my public folder.