Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ Add the following dependency to your dev profile:

[reloaded.repl "0.2.3"]

boot uses additionally need one more dependency:

[boot/core "x.y.z"]

were "x.y.z" is the boot version.

## Usage

Require the `reloaded.repl` namespace in your user.clj file, and use
Expand Down
9 changes: 8 additions & 1 deletion src/reloaded/repl.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns reloaded.repl
(:require [com.stuartsierra.component :as component]
[clojure.tools.namespace.repl :refer [disable-reload! refresh refresh-all]]
[clojure.tools.namespace.repl :refer [disable-reload! refresh refresh-all set-refresh-dirs]]
[suspendable.core :as suspendable]))

(disable-reload!)
Expand All @@ -9,6 +9,13 @@

(def initializer nil)

(try
(require 'boot.core)
(let [get-env (ns-resolve (symbol "boot.core") (symbol "get-env"))
dirs (get-env :directories)]
(apply set-refresh-dirs dirs))
(catch Throwable _))

(defn set-init! [init]
(alter-var-root #'initializer (constantly init)))

Expand Down