About: I'm a software developer currently working on multiple projects at Kellton Tech. Mostly doing TypeScript and React on a daily basis, focusing on front-end work. On a side note I also work with Clojure
Location:
Ribeirão Preto, Brazil
Joined:
Jan 13, 2022
What's the simplest way to compile ClojureScript to JS? Like 1 file, no overhead.
I think the best overall solution is shadow-cljs, but this requires a project setup. If you just want to transform some CLJS code, try something like this in a CLJS repl:
(require'[cljs.js:refer[empty-statecompile-str]])(compile-str(empty-state)"(defn add [x y] (+ x y))"#(println(:value%)))
I think the best overall solution is
shadow-cljs
, but this requires a project setup. If you just want to transform some CLJS code, try something like this in a CLJS repl:Check the
cljs.js/compile-str
docs.