We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
a-h
joerdav
Learn more about funding links in repositories.
Report abuse
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Im looking for a way to chain commands with the templ generate proxy watch. Im considering altering https://github.com/a-h/templ/blob/main/cmd/templ/generatecmd/run/run_unix.go#L55 if it makes sense to do so, or maybe allow multiple commands to be specified,
Im ultimately just looking for a clean way to have templ run al the tools i need instead of relying on extra tools
Lets say I have a script in scripts/build.sh which runs something like tailwind and a bundler
scripts/build.sh
something like the following as a makefile command should in theory work
templ generate -watch -proxy="http://localhost:8080" \ -watch-pattern="(.+\\.go$$)|(.+\\.templ$$)|(.+_templ\\.txt$$)|(.+\\.css$$)|(.+\\.ts$$)" \ -cmd="scripts/build.sh" -v
I will always get Error executing command [ error=fork/exec scripts/build.sh: no such file or directory ]
Error executing command [ error=fork/exec scripts/build.sh: no such file or directory ]
I could also try something like
templ generate -watch -proxy="http://localhost:8080" \ -watch-pattern="(.+\\.go$$)|(.+\\.templ$$)|(.+_templ\\.txt$$)|(.+\\.css$$)|(.+\\.ts$$)" \ -cmd="cmd1 && cmd2" -v
Or
templ generate -watch -proxy="http://localhost:8080" \ -watch-pattern="(.+\\.go$$)|(.+\\.templ$$)|(.+_templ\\.txt$$)|(.+\\.css$$)|(.+\\.ts$$)" \ -cmd="cmd1; cmd2;" -v
But i think this fails due to the way go executes commands,
possibly similar to this issue
https://stackoverflow.com/questions/34458625/run-multiple-exec-commands-in-the-same-shell-golang
even trying simple commands in the -cmd input causes odd outputs, like pwd; pwd; or pwd && pwd
pwd; pwd;
pwd && pwd
The text was updated successfully, but these errors were encountered:
side note, my original code, the commands are run in a Makefile hence the regex has $$ escapes
Sorry, something went wrong.
No branches or pull requests
Im looking for a way to chain commands with the templ generate proxy watch. Im considering altering https://github.com/a-h/templ/blob/main/cmd/templ/generatecmd/run/run_unix.go#L55 if it makes sense to do so, or maybe allow multiple commands to be specified,
Im ultimately just looking for a clean way to have templ run al the tools i need instead of relying on extra tools
Lets say I have a script in
scripts/build.sh
which runs something like tailwind and a bundlersomething like the following as a makefile command should in theory work
I will always get
Error executing command [ error=fork/exec scripts/build.sh: no such file or directory ]
I could also try something like
Or
But i think this fails due to the way go executes commands,
possibly similar to this issue
https://stackoverflow.com/questions/34458625/run-multiple-exec-commands-in-the-same-shell-golang
even trying simple commands in the -cmd input causes odd outputs, like
pwd; pwd;
orpwd && pwd
The text was updated successfully, but these errors were encountered: