How to compile ClojureScript inside Clojure -


I want to compile the ClojureScript inside the Clojure and I'm having some problems. I would like to do something like this:

  (def x '(map (fn [n] (* nnn)) [1 2 3 4])) (cljs-> js x)   < P> Where the  cljs-> js  javascript code gets returns. I think something is similar (reading closurescript first string first), but I do not have enough information about closurescript.  

Is this a simple solution?

Have you seen the snow code? Where code sent by UI is compiled, which originally calls cljs.compiler from clojerscript project. Note that the snowmember is probably much more complicated than you are asking, maybe you should just do the "compile" function

Comments