-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Add html2gomponents tool #232
base: main
Are you sure you want to change the base?
Conversation
This is a separate tool for converting HTML to gomponents. I decided to have a go at this after all, like @amrojjeh got started in #178, but with the HTML parser built by the Go team. I actually like that there's an authorative converter tool. This lives in an entirely separate module in the same repo. I'm not yet sure what the implications are of this, but I'm going to give it a try. See #167
Nice that you are working on this, I need this all the time as well. Would be nice to have a command line tool for this eventually. |
Yeah @tevintchuinkam this is a command line tool. I'm thinking of putting it in a separate repo though, because the versioning for the library would conflict with any versioning for the tool, because versioning in Go can only use git tags AFAIK. |
Cobra has their CLI in a separate repo so that would follow convention |
I continue to be lazy about wanting to move this to a separate repo, but here's the core conversion code that's powering my conversion site. You could shove this into your CLI super easily, just call This doesn't do the go file package/function wrapper stuff because I didn't personally want that. https://gist.github.com/traherom/cc4ae4661d457177ce256ac52e1c8637 PS, I love Gomponents. |
❤️ |
This is a separate tool for converting HTML to gomponents. I decided to have a go at this after all, like @amrojjeh got started in #178, but with the HTML parser built by the Go team. I actually like that there's an authorative converter tool.
This lives in an entirely separate module in the same repo. I'm not yet sure what the implications are of this, but I'm going to give it a try.
See #167