Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 1.43 KB

README.adoc

File metadata and controls

29 lines (23 loc) · 1.43 KB

Delegating ClojureScript REPL

Clojars Project

This is a ClojureScript REPL which simply delegates to another. By wrapping another REPL in this way, we can add useful actions around certain parts of the lifecycle.

The only feature supported now is :launch-command, which is an alternative to the :launch-browser option in the browser repl where you choose how to launch. The :launch-command is also run on a separate thread in order to avoid it holding up the launch of your tests.

This is most useful with kaocha-cljs due to CLJ-2493. But it is likely useful with other ClojureScript environments also.

Example Kaocha use

tests.edn
:tests [{…
         :cljs/repl-env io.dominic.delegating-repl.core/repl-env
         :cljs/compiler-options
         {:io.dominic.delegating-repl/repl-env cljs.repl.browser/repl-env
          ;; Don't create visible GUI, prevent stealing focus.
          :launch-command ["chrome" "--silent-launch" "http://localhost:9000"]
          ;; Do create a visible tab, but don't worry, it won't block.
          :launch-command ["chrome" "http://localhost:9000"]
          ;; Prevent cljs.repl.browser from starting a browser.
          :launch-browser false}}]