depado / pb-templ-htmx-tailwind

POC with PocketBase, Templ, HTMX and Tailwind
MIT License
14 stars 2 forks source link

hot reload runner #4

Closed gedw99 closed 6 months ago

gedw99 commented 6 months 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 6 months 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 6 months 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.