helix

2022-05-16T09:58:13.055709Z

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.

2022-05-16T10:08:04.809849Z

output.clj produced from input.jsx by https://gist.github.com/geraldodev/2e61f7968bb65997cabc3bde3225b214

lilactown 2022-05-16T15:37:53.825559Z

neat!

lilactown 2022-05-16T15:38:09.231389Z

that could be a good teaching tool