            (assoc :default-module module-name)
            )))))
 
-(defn flush-to-disk
-  "flush all generated sources to disk, not terribly useful, use flush-unoptimized to include source maps"
-  [{:keys [work-dir sources] :as state}]
-  (with-logged-time
-    [state {:type :flush-to-disk}]
-    (doseq [{:keys [type name compiled] :as src} (vals sources)
-            :when (and (= :cljs type)
-                       compiled)]
-
-      (let [{:keys [js-name output]} src
-            target (io/file work-dir js-name)]
-        (io/make-parents target)
-        (spit target output)))
-    state))
-
 (defn closure-defines-json [{:keys [closure-defines] :as state}]
   (let [closure-defines
         (reduce-kv

    [state {:type :flush-unoptimized
            :compact true}]

    (flush-manifest public-dir build-modules false)

    ;; flush fake modules
    (doseq [{:keys [default js-name name prepend append sources web-worker] :as mod} build-modules]
      (let [target (io/file public-dir js-name)


  (with-logged-time
    [state {:type :flush-unoptimized}]

    (doseq [mod build-modules]
      (flush-unoptimized-module! state mod))
