Running the tests or the app in watch mode is often convenient, and there's watchexec to help with this, but it has issues that sometimes it seems to get stuck in e.g. the compilation phase.
I'm using two helpers:
gr (Gleam Run)
#!/bin/sh
watchexec --restart --wrap-process=session gleam run "$@"
gt (Gleam Test)
#!/bin/sh
watchexec --on-busy-update=queue --wrap-process=session gleam test
I don't remember exactly why I used on-busy-update, could be to get around broken cache issues when using this with lustre/dev.
Perhaps someone has a simpler/better approach though!
Hello! Thank you, but here the goal is to document how to do things in Gleam code, so it wouldn't be the place to document CLI programs, even if one could use them with Gleam.
Running the tests or the app in watch mode is often convenient, and there's
watchexec
to help with this, but it has issues that sometimes it seems to get stuck in e.g. the compilation phase.I'm using two helpers:
gr
(Gleam Run)gt
(Gleam Test)I don't remember exactly why I used on-busy-update, could be to get around broken cache issues when using this with lustre/dev.
Perhaps someone has a simpler/better approach though!