Fork me on GitHub
#biff
<
2024-02-14
>
Petar Radosevic06:02:33

Has anybody looked into automatically refreshing the browser when a change is made? Seems like that would be a "quality-of-life" improvement when developing, maybe with something like https://github.com/weavejester/ring-refresh.

❤️ 3
Jacob O'Bryant15:02:30

it's been on my todo list for a while: https://github.com/jacobobryant/biff/issues/117 -- for about 2 years in fact! I should probably bump that up in priority since it's been brought up by a handful of people.

Jacob O'Bryant16:02:50

I just pushed a refresh-on-save branch that uses htmx websockets to refresh the web page whenever files are saved: https://github.com/jacobobryant/biff/commit/26c043e93f9cbc6531a7f48cbe9673a248e11fbe If there was a compilation error, that will be displayed on the web page instead of refreshing. I'll think of better names + clean this up and release it with Biff at some point; in the mean time you can go ahead and apply the changes from that commit to your own project(s).

👍 2
Petar Radosevic10:02:16

That’s amazing, will implement this in my project, thank you!

🙌 1
Jacob O'Bryant03:02:15

Just made a release with this actually: https://github.com/jacobobryant/biff/discussions/188. I re-implemented it as a component so you only have to change a couple lines in your project.

4
Jacob O'Bryant16:02:50

I just pushed a refresh-on-save branch that uses htmx websockets to refresh the web page whenever files are saved: https://github.com/jacobobryant/biff/commit/26c043e93f9cbc6531a7f48cbe9673a248e11fbe If there was a compilation error, that will be displayed on the web page instead of refreshing. I'll think of better names + clean this up and release it with Biff at some point; in the mean time you can go ahead and apply the changes from that commit to your own project(s).

👍 2