Open jmpavlick opened 5 months ago
As a developer, I should see compiler errors in the browser when using the watcher / live reloader, if the build fails.
The compiler errors should be displayed as a full-screen output listing, ideally with the same color-coding as is used by the terminal.
When the build is successful again, the page should refresh and display the successfully-compiled output.
——
@hayleigh-dot-dev’s notes:
in the live_reload module there's a script to inject the live reloading stuff, you'd probably add an extra case to
live_reload
socket.onmessage = (event) => { if (event.data === 'reload') { window.location.reload(); } };
in the file watcher actor we just discard failing builds:
case cli.run(script, Nil) { Ok(_) -> { use _, client <- set.fold(state, Nil) process.send(client, Reload) } Error(_) -> Nil }
but you could grab the error and do error.explain to get the error text, wrap it in a div and some stuff
error.explain
As a developer, I should see compiler errors in the browser when using the watcher / live reloader, if the build fails.
The compiler errors should be displayed as a full-screen output listing, ideally with the same color-coding as is used by the terminal.
When the build is successful again, the page should refresh and display the successfully-compiled output.
——
@hayleigh-dot-dev’s notes:
in the
live_reload
module there's a script to inject the live reloading stuff, you'd probably add an extra case toin the file watcher actor we just discard failing builds:
but you could grab the error and do
error.explain
to get the error text, wrap it in a div and some stuff