Skip to content

SevereOverfl0w/delegating-repl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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}}]

About

A ClojureScript REPL that Delegates to another REPL

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published