Created
September 11, 2018 15:58
-
-
Save runejuhl/378066a83f39677ef87cfee10e47a441 to your computer and use it in GitHub Desktop.
Compile CLJS to JS from Clojure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(with-out-str | |
(let [ env (merge (cljs.analyzer/empty-env) '{:ns {:name some.ns}})] | |
(cljs.compiler/emit (cljs.analyzer/analyze env '(+ 1 2))))) | |
;; "((1) + (2));\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment