Created
March 10, 2015 08:27
-
-
Save bartojs/ee4115d2da5201096e90 to your computer and use it in GitHub Desktop.
cljs hello world
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
curl -LO https://github.com/clojure/clojurescript/releases/download/r3058/cljs.jar | |
mkdir -p src/hello | |
echo '(ns hello.core) (enable-console-print!) (println "Hello world!")' > src/hello/core.cljs | |
java -cp cljs.jar:src clojure.main -e '(require `cljs.closure) (cljs.closure/build "src" {:output-to "out/main.js"})' | |
echo '<html><body><script src="out/goog/base.js"></script><script src="out/main.js"></script><script>goog.require("hello.core")</script></body></html>' > index.html | |
open index.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment