 
 (defn clean
   [project-dir & [opts]]
-  (let [opts (or opts (default-build-options project-dir))]
+  (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")
-         (default-build-options "/Users/robert/clojure/cloxp-cljs-repl"))+         (build-opts-for-project "/Users/robert/clojure/cloxp-cljs-repl"))
  (if-let [file (or file (find-file-for-ns-on-cp changed-ns))]
    (let [new-source (or new-source (slurp file))
          old-source new-source
          build-opts (default-build-options project-dir)
          compiler-env (or compiler-env env/*compiler* (env/default-compiler-env))]
      (build/build project-dir build-opts compiler-env)
      (ensure-ns-is-recompiled changed-ns file new-source build-opts compiler-env))


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