My gulp workflow sometimes will yield multiple html files (e.g. I change a Jade partial and 3 dependent files are regenerated) within 1-2 seconds. This cause BS to reload as many times as the number of files, sometimes actually missing the last one (incidentally exactly the one I have open in the browser).
Is there a way to debounce these refreshes? Ideally it should happen either:
_.debounce(refresh, 1000), a second after the last file changes, or
_.debounce(refresh, 1000, {leading:true}), as soon as the first file changes and a second after the last file changes