Ensure :reload-paths default to ["src"]
This commit is contained in:
parent
4eeb9ea27f
commit
57567629a8
|
@ -69,6 +69,10 @@ The following options are supported:
|
|||
when they are modified. Defaults to true in development, false in
|
||||
production.
|
||||
|
||||
* `:reload-paths` -
|
||||
A seq of source paths to reload. Defaults to [\"src\"].
|
||||
Only relevant if :auto-reload? is true.
|
||||
|
||||
* `:auto-refresh?` -
|
||||
True if you want your browser to automatically refresh when source
|
||||
files are changed. Defaults to false.
|
||||
|
|
|
@ -36,3 +36,7 @@
|
|||
"True if stacktraces should be shown for exceptions raised by the handler."
|
||||
[options]
|
||||
(:stacktraces? options dev-env?))
|
||||
|
||||
(defn reload-paths
|
||||
[options]
|
||||
(:reload-paths options ["src"]))
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
|
||||
(defn- add-auto-reload [handler options]
|
||||
(if (auto-reload? options)
|
||||
(wrap-reload handler {:dirs (:reload-paths options)})
|
||||
(wrap-reload handler {:dirs (reload-paths options)})
|
||||
handler))
|
||||
|
||||
(defn- add-auto-refresh [handler options]
|
||||
|
|
Reference in a new issue