Gleam v1.17 - Single file Gleam BEAM programs with escript
45 points by giacomo_cavalieri
45 points by giacomo_cavalieri
Just a few days ago, inspired by [1], I had begun transitioning my justfiles and shell scripts to gleam code in $PROJECT_ROOT/dev. The timing of —no-print-progress flag landing in this release feels like the cosmos validating my choice :)
Grazie mille!
Oh that's a nice read! I tend to have a bin directory with a bunch of shell scripts for each project and use direnv to add it to the path when I'm inside that project
Yours is surely the standard and less time-consuming way. I just had an itch to avoid an additional shell-hook accessing/manipulating environment variables on every directory change. I figured, as long as there exists a gleam.toml in the project root, gleam dev can find the correct files to run; and so, I can shoehorn it as a task runner. Moreover, I can extract the common workloads to a local or git dependency. Ultimately, I'm just bike-shedding but it's okay to have guilty-pleasures now and then :)
I somehow didn’t know that the gleam dev command existed.
Run the project development entrypoint
I, uh, don’t know what this means lol What do people use it for?
In a gleam project you can have three main folders with code: src, for your source code; test, for test code; and dev. Much like test, the code under dev can use dev dependencies, and is not included in your production app. Under dev you'll find all sort of code useful at development time: stuff like benchmarks, code generation scripts, dev servers, and so on...
I can't believe I've been writing Gleam for years and I've only just learnt about this. I'll have to go back to all my projects and remove the codegen modules I created, thanks!