guybedford / chomp

'JS Make' - parallel task runner for the frontend ecosystem with a JS extension system.
https://chompbuild.com
Apache License 2.0
138 stars 7 forks source link

Request for debouncing file changes #124

Closed zachsa closed 1 year ago

zachsa commented 2 years ago

I have the following workflow:

I save a file => prettier rewrites the file => then chomp does it's thing

But currently the chomp task runs immediately on file save, and then is aborted and restarts on the prettier save. Could chomp support debouncing?

In this case the chomp task would run x ms after the last time a watched file is saved (say 100ms). This is similar to the nodemon --delay option

guybedford commented 2 years ago

We could certainly add an watch-invalidation: 'delay' field to a task. Perhaps supporting none would allow tasks which don't change when used in watch mode as well.

guybedford commented 1 year ago

I believe this was implemented, but please reopen if I'm wrong.