Skip to content

Instantly share code, notes, and snippets.

@cemerick
Created October 5, 2012 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cemerick/3839780 to your computer and use it in GitHub Desktop.
Save cemerick/3839780 to your computer and use it in GitHub Desktop.
cljx/ClojureScript auto compilation + REPL in one JVM/lein process
# Add to your project.clj:
{:plugins [[lein-pdo "0.1.1"]]
:aliases {"autorepl" ["pdo" "fork" "cljx" "auto,"
"fork" "cljsbuild" "auto,"
"repl" ":headless"]}}
$ lein autorepl
Forking cljx auto
Forking cljsbuild auto
Compiling ClojureScript.
Watching [src/cljx] for changes.
Rewriting src/cljx to target/classes (clj) with 2 rules.
Rewriting src/cljx to target/generated/cljs (cljs) with 7 rules.
Compiling "target/classes/compiled/cljs/xxx.js" from "src/cljs"...
nREPL server started on port 56260
Successfully compiled "target/classes/compiled/cljs/xxx.js" in 9.704333 seconds.
# Connect to the REPL from any nREPL client
# Any changes to .cljs or .cljx files will be picked up for recompilation automatically
# (no need for separate cljsc / REPL processes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment