 
 (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/"))

(comment 
 (cljs.closure/src-file->target-file
   "/Users/robert/Lively/LivelyKernel/cloxp-cljs-scratch/src/cljs/rksm/cljs_workspace_test.cljs"
   (default-build-options "/Users/robert/Lively/LivelyKernel/cloxp-cljs-scratch")))

; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
; cljs build related


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

(comment (clean "/Users/robert/clojure/cloxp-cljs-repl")
         (clean "/Users/robert/clojure/cloxp-com")
         (build-opts-for-project "/Users/robert/clojure/cloxp-cljs-repl"))