laravel-elixir-livereload
laravel-elixir-livereload copied to clipboard
Implement something like _.debounce
When you generate more than one css or js, the browser gets crazy and reloads several times, we could use something like http://underscorejs.org/#debounce to debounce the livereload.changed call (index.js line:23)
I can open a PR for this if you want, only wanted to know if there is any reason for this being that way...
I am looking at these past issues to clear them up, now that I have updated it to work with Elixir 3.x. I am wondering how a debounce would work.
The way that the livereload
should have worked before was passing the path of files changed through to the changed
method. It should have just loaded the css or js.
I would like to improve this more than I have. Originally when I first tried wrapping livereload within elixir I got a whole mess of repeats. See #1
I am not sure it will work. Even if I save a list of files that changed, I cannot pass an array of files which changed to livereload's change method
Were you seeing css and js not live reloading either? I see it working correctly on my projects.