You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am a big fan of the --watch mode with templ generate, it supports that flow we really are looking for at Padeia. The flow also typically consist of pushing small changes (as a PR), however, since templ generate --watch generates _templ.txt and a different _templ.go file; they are often pushed to a branch (or even to a server, from time to time).
I am not sure how to fix this yet, I have been thinking about maybe we can search for _templ.txt files in a git hook or something? Not sure. Current fix is to let the team know to stop the templ generate --watch command before pushing to git.
However, I thought I'd share the problem we're facing as there might be others having the same issues.
templ info output
(✓) os [ goos=darwin goarch=arm64 ]
(✓) go [ location=/opt/homebrew/bin/go version=go version go1.23.0 darwin/arm64 ]
(✓) gopls [ location=/Users/cobraz/go/bin/gopls version=golang.org/x/tools/gopls v0.16.2 ]
(✓) templ [ location=/Users/cobraz/go/bin/templ version=v0.2.778 ]
The text was updated successfully, but these errors were encountered:
We have a bit of a conversation ongoing at the moment on this with some PoCs floating around too.
The first plan of attack is to make watch mode generated go files the same as production generated go files. Then the txt files can just be git ignored.
I am a big fan of the
--watch
mode withtempl generate
, it supports that flow we really are looking for at Padeia. The flow also typically consist of pushing small changes (as a PR), however, sincetempl generate --watch
generates_templ.txt
and a different_templ.go
file; they are often pushed to a branch (or even to a server, from time to time).I am not sure how to fix this yet, I have been thinking about maybe we can search for
_templ.txt
files in a git hook or something? Not sure. Current fix is to let the team know to stop thetempl generate --watch
command before pushing to git.However, I thought I'd share the problem we're facing as there might be others having the same issues.
templ info
outputThe text was updated successfully, but these errors were encountered: