Scripting ClojureScript with JavaScript

1 · David Nolen · March 10, 2015, midnight
The following code demonstrates how to script the ClojureScript compiler with the Nashorn JavaScript engine that ships with Java 8. Create a file called build.js with the following contents: // Use the Java interop clojure.lang.RT namespace to get at // Clojure vars var ArrayList = java.util.ArrayList, RT = Packages.clojure.lang.RT, seq = RT.var("clojure.core", "seq"); // ================================================================================ // Bootstrap // Nashorn JavaScrip...