romshark / templier

A Go Templ web frontend development environment that automatically rebuilds the server and reloads the tab.
MIT License
45 stars 3 forks source link

Implementing different templ modes: `fast` and `rebuild` #6

Open bastianwegge opened 2 months ago

bastianwegge commented 2 months ago

Need

I'd love to have a way to switch between different templ modes. One could be the fast txt-reload using the templ proxy, the other one could be actually rebuilding the server, restarting and then reconnecting. Depending on the work I do I could then switch to one or the other based on my needs. I found especially when doing many small changes repeatedly that this "stop templier, commit your work, start templier" workflow really slows me down.

Acceptance criteria

romshark commented 2 months ago

There's talks going on in the templ Slack Gophers channel about a potential fix to this problem in templ itself. I'm not convinced it's worth having this feature in Templier if it becomes obsolete soon.

We have some plans for this. We have ideas about how we can change our generated go files to be the same in dev/release mode. And also some ideas to clean up txt files, either storing their contents in memory, or as you said storing them somewhere else in a gitignore-able place. - Joe Davidson