 (ns adzerk.boot-reload
   {:boot/export-tasks true}
   (:require
+   [boot.core          :as b]
    [clojure.java.io    :as io]
    [clojure.set        :as set]
+   [clojure.string     :as string]
    [boot.pod           :as pod]
    [boot.file          :as file]
    [boot.util          :as util]

        (-> fileset (add-resource tmp) commit!))
      (with-post-wrap fileset
        (send-changed! @pod asset-path (changed @prev fileset))
        (reset! prev fileset)))))


         (sort-by :dependency-order)
         (map tmp-path))))

(defn- start-server [pod {:keys [ip port] :as opts} domain]
  (let [{:keys [ip port]}
        (pod/with-call-in pod (adzerk.boot-reload.server/start ~opts))
        host (if-not (string/blank? domain) domain (if-not (= ip "0.0.0.0") ip "localhost"))]
    (util/with-let [url (format "ws://%s:%d" host port)]
      (util/info "<< started reload server on %s >>\n" url))))

