-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
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
Suggestion qtc: Add a watcher qtc -w #7
Comments
I'm not sure how this would work. Quicktemplate only creates *.go files by running |
This requires recompilation of the whole application. I doubt |
@valyala Yes, this is a problem with most of the good Go templating engines, except the ones that don't generate source code (like Jet). Every time you make the smallest change in any template, you have to run |
Yes, you're right , the whole application needs to be re-compiled... I'm closing this issue and sorry I should know that |
I don't want complicating fasttemplate. So it would be better just using Jet. It looks like it is the fastest template engine for go at the moment, which doesn't require source code recompilation after each modification. |
modd is a nice tool I just found to handle this. Here is my
With this setup changing a single The last part at the bottom uses devd from the same author to work with livereload. That part can be removed if you don't want livereload. |
@stereosteve , this is awesome! |
@valyala thanks for quicktemplate! It is so much better than |
Add a watcher subcommand/flag for example
qtc -w ./ -d ./templates
-> watch and compile on file changes in the current directory, serve the compiled files in the ./templates directory.You can use fsnotify package, I will do that on iris but it will be nice to have it build'n with qtc :)
P.S: I don't know if go generate has a watch command but I doubt
The text was updated successfully, but these errors were encountered: