 (defn get-meta-data-for-ns [ns]
   (get ns-meta-data ns))
 
+(defn resolve-ns [ns]
+  (str (string/replace-first (.-basePath js/goog) "/goog" "")
+       (string/replace ns "." "/")
+       ".js"))
+
 (defn js-reload [{:keys [request-url namespace dependency-file meta-data] :as msg} callback]
   (swap! ns-meta-data assoc namespace meta-data)
-  (print (pr-str @ns-meta-data))
   (if (and
        (or dependency-file
            (and meta-data (:figwheel-load meta-data))

(ns figwheel.client.file-reloading
  (:require
   [goog.Uri :as guri]
   [goog.net.jsloader :as loader]
   [clojure.string :as string]
   [cljs.core.async :refer [put! chan <! map< close! timeout alts!] :as async])

(defn truncate-url [url]
  (-> (first (string/split url #"\?")) 
      (string/replace-first (str (.-protocol js/location) "//") "")
      (string/replace-first ".*://" "")
      (string/replace-first #"^//" "")         
      (string/replace-first #"[^\/]*" "")))

