Added :reload-paths to options

This option allows users to specify which directories wrap-reload checks.
See also: https://github.com/weavejester/lein-ring/issues/46
This commit is contained in:
Dave Sann 2013-02-18 21:48:45 +11:00
parent 9cfbb42067
commit 4eeb9ea27f

View file

@ -57,7 +57,7 @@
(defn- add-auto-reload [handler options] (defn- add-auto-reload [handler options]
(if (auto-reload? options) (if (auto-reload? options)
(wrap-reload handler) (wrap-reload handler {:dirs (:reload-paths options)})
handler)) handler))
(defn- add-auto-refresh [handler options] (defn- add-auto-refresh [handler options]
@ -81,6 +81,7 @@
:browser-uri - the path to browse to when opening a browser :browser-uri - the path to browse to when opening a browser
:stacktraces? - if true, display stacktraces when an exception is thrown :stacktraces? - if true, display stacktraces when an exception is thrown
:auto-reload? - if true, automatically reload source files :auto-reload? - if true, automatically reload source files
:reload-paths - seq of src-paths to reload on change - defaults to [\"src\"]
:auto-refresh? - if true, automatically refresh browser when source changes :auto-refresh? - if true, automatically refresh browser when source changes
If join? is false, a Server object is returned." If join? is false, a Server object is returned."