Fork me on GitHub
#helix
<
2022-05-16
>
geraldodev09:05:13

jsx_to_helix.clj It may be useful for someone. I put this on my dev namespace, update (def input-jsx and (def output-clj variables to point to a meaninfull place on your computer and execute the first line of the comment (print (emit (parse-input)) https://gist.github.com/geraldodev/2e61f7968bb65997cabc3bde3225b214, Im using clojure data.xml to read the files, the jsx needs a root element. I'm importing {{ js-obj }} as strings to pass the gates of data.xml and later, I str/replace the js obj to a clj one, It's working for simple js literall objects. I even try to read as edn/string and if not susscessfull I put ;; TODO: fix the obj, if successfull I keywordize the obj with clojure.walk/keywordize-keys. Oh and I prepend these little creatures with #js. If you use j/lit its trivial to change.

lilactown15:05:09

that could be a good teaching tool