3 ms·
Nice, I've used an editor plugin for this before, but I like that this isn't tied to any specific editor. Actually Hugo also does this, though again that's tied
by pierrec 2y ago
Nice, I've used an editor plugin for this before, but I like that this isn't tied to any specific editor. Actually Hugo also does this, though again that's tied to a framework:
https://gohugo.io/getting-started/usage/#livereload https://gohugo.io/getting-started/usage/#livereload
Also curious about this: "The delta-streamer.js script then checks if the current window origin is the updated file. If so, it reloads the page."
Does that mean it doesn't auto-refresh if dependencies (scripts, stylesheets, etc) are updated? Maybe there's room for improvement here though I'm not sure how I would approach it. Maybe just an option to skip the check would do the job.
- baalimago 2y ago>Does that mean it doesn't auto-refresh if dependencies It does refresh on all other file changes. I first thought about trying to figure out what js/css was used on which page but that turned too complicated. So now it refreshes on all js/css files [1]. [1]: https://github.com/baalimago/wd-41/blob/main/internal/wsinject/delta_streamer.ws.go#L34 https://github.com/baalimago/wd-41/blob/main/internal/wsinje...