Fork me on GitHub
#reagent
<
2022-10-18
>
agorgl13:10:47

Hello there, I'm not really sure if this is the right channel to ask, but is there any good utility / snippet to convert jsx/html to hiccup?

p-himik13:10:01

I don't think I've seen one. Are you asking because there's a lot of code? Or because you're unsure how to do something like that?

agorgl13:10:17

Loooooots of code

agorgl13:10:37

(mostly I want to convert some tailwindcss components to hiccup)

alekszelark13:10:13

Not sure about jsx, but for html hiccup conversion you can use a babashka script

p-himik13:10:53

Ah, yeah, my "haven't seen one" remark was about JSX->Hiccup. HTML->Hiccup is absolutely possible, there are multiple solutions.

agorgl13:10:50

Any specific ones you have used?

p-himik13:10:16

I believe I've used https://github.com/clj-commons/hickory before, but it was a long time ago.

agorgl14:10:42

I might pull of a oneliner for my editor somehow

agorgl14:10:39

damn I was about to write a babashka script for this

Jacob Emcken20:10:43

Funny, I just published this earlier today... maybe you can use it: https://html2hiccup.netlify.app/