       :source-map source-map-file
       :warnings true})))
 
-(defonce builds (atom {}))
+(defn build-opts-for-project
+  [project-dir]
+  (or (get @builds (str project-dir))
+      (default-build-options project-dir)))
 
 (defn- cljs-source-paths
   [project-dir]


(defn clean
  [project-dir & [opts]]
  (let [opts (or opts (default-build-options project-dir))]
    (cljsb/clean-build opts)))

(comment (clean "/Users/robert/clojure/cloxp-cljs-repl")
         (clean "/Users/robert/clojure/cloxp-com")
         (default-build-options "/Users/robert/clojure/cloxp-cljs-repl"))

(def ^{:dynamic true} *optimizations* :none)

(defonce builds (atom {}))

(defn set-build-opts!
  [project-dir opts]
  (let [opts (build/add-implicit-options opts)]
    (swap! builds assoc (str project-dir) opts)
    opts))

(defn default-build-options
  [project-dir]
  (let [target-dir (.getCanonicalPath (io/file project-dir "cloxp-cljs-build/"))
