                           compiler-options
                           (:compiler-options main))))
 
+(defn set-option [ctx k value]
+  (when-let [current-value (get-in ctx [:opts k])]
+    (butil/warn "WARNING: Replacing ClojureScript compiler option %s with automatically set value.\n" k))
+  (assoc-in ctx [:opts k] value))
+
 (defn main
   "Middleware to create the CLJS namespace for the build's .cljs.edn file and
   set the compiler :output-to option accordingly. The :output-to will be derived

        (spit (format-ns-forms (main-ns-forms cljs-ns init-nss init-fns)))))
    (-> ctx
        (update-in [:opts :asset-path] #(if % % asset-path))
        (assoc-in [:opts :output-dir] out-path)
        (assoc-in [:opts :output-to] js-path)
        (assoc-in [:opts :main] cljs-ns))))

(defn modules
  "If .cljs.edn file contains modules declaration, use it to create options

(ns adzerk.boot-cljs.middleware
  (:require [adzerk.boot-cljs.util :as util]
            [boot.file :as file]
            [boot.util :as butil]
            [clojure.java.io :as io]
            [clojure.string :as string]))

