bcomnes / cpx2

Maintenance fork of cpx. A cli tool to watch and copy file globs. 🤞hoping to get this work merged one day.
MIT License
46 stars 3 forks source link

Feature: --watch 1234 to debounce for 1234 millsecs #129

Open anodynos opened 1 week ago

anodynos commented 1 week ago

Hey, great project, very useful!

It would be great if --watch could optionally accept a number of milliseconds to debounce (i.e how long to wait, since the last change event was received), instead of naively responding immediately to a change.

This is useful when you copy from a src which is in a build process, so there will be a lot of files to be generated, and it should wait until all are done before copying.

It's not only for optimization & speed, cause in my actual use case it breaks when src is under a full build, and I have to restart the cpx process.... The partial build of src on the other hand works like a charm!

bcomnes commented 1 week ago

Open to it.