Skip to content

Instantly share code, notes, and snippets.

@mfikes
Last active March 8, 2019 12:11
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mfikes/9f13a8e3766d51dcacd352ad9e7b3d1f to your computer and use it in GitHub Desktop.
Save mfikes/9f13a8e3766d51dcacd352ad9e7b3d1f to your computer and use it in GitHub Desktop.
cljs.main rebel-readline

Start cljs.main with rebel-readline:

clojure -Sdeps '{:deps {github-mfikes/cljs-main-rebel-readline {:git/url "https://gist.github.com/mfikes/9f13a8e3766d51dcacd352ad9e7b3d1f" :sha "27b82ef4b86a70afdc1a2eea3f53ed1562575519"}}}' -i @setup.clj -m cljs.main
{:paths ["."]
:deps {org.clojure/clojurescript {:mvn/version "1.10.145"}
com.bhauman/rebel-readline-cljs {:mvn/version "0.1.1"}}}
(require 'rebel-readline.cljs.repl)
(let [cljs-repl cljs.repl/repl*]
(alter-var-root #'cljs.repl/repl*
(fn [x]
(fn [env opts]
(with-redefs [cljs.repl/repl* cljs-repl]
(rebel-readline.cljs.repl/repl* env opts)))))
nil)
@bhauman
Copy link

bhauman commented Mar 11, 2018

OK it should be {:mvn/version "0.1.1"}

@bhauman
Copy link

bhauman commented Mar 11, 2018

oh and we don't need to (require 'cljs.repl) I added that without thinking

@mfikes
Copy link
Author

mfikes commented Mar 12, 2018

Thanks! Updated!

@dimovich
Copy link

dimovich commented Mar 8, 2019

Hello. Trying to run this, the browser launches, yet no REPL comes up in the console, just the message [Rebel readline] Type :repl/help for online help info. Would appreciate your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment