Depado / pb-templ-htmx-tailwind

POC with PocketBase, Templ, HTMX and Tailwind
MIT License
5 stars 3 forks source link

hot reload runner #4

Closed gedw99 closed 1 month ago

gedw99 commented 1 month ago

I was trying this out and saw that you were trying to optimise hit reload

https://github.com/cirello-io/runner might be better for controlling the processes. It's pretty amazing what it can do with running many processes and watching for file changes.

works on windows, Mac and linux too.

Depado commented 1 month ago

Hi! Just a warning, this is a work in progress and I'm committing daily to it lately so expect things to break every once in a while!

Thanks for the suggestion! But it seems that wouldn't fit the use case I'm facing here because I need to react differently if different files are changed (recompile when go files change, re-run templ generate when templ file change). The current implementation "works" but doesn't benefit from hot reloading from templ. I'll wait for bokwoon95/wgo#8 to be resolved once (if) a-h/templ#687 is merged :smile: and then use

templ generate --watch --cmd "wgo ..." 

So it can benefit from both wgo's live reload capabilities and templ's proxy.

I appreciate the suggestion though!

gedw99 commented 1 month ago

Yes I know its all alpha and chasing fast but I think its a really good base, and wanted to help out.

no worries - I figured Runner might be useful but guess not.

I use it to run many processes. It has supervisions trees, so pretty slick.