digisfera / lr-http-server

An HTTP server with livereload included
31 stars 9 forks source link

debounce file changes so they can be grouped #9

Closed oroce closed 7 years ago

oroce commented 7 years ago

We've been using lr-http-server to serve our static site, but while we are building/watching our directory there can be multiple file changes at (nearly) the same time which leads basically having this blinking page because livereload tries to send all the changes after each other (css, html, javascript).

So I added a new option which can be passed to lr-http-server to configure on how often it should emit the changed files list. If you omit it, it will be set to zero which means it will list the changed files at process.nextTick.