(defn emit-cached-core [src dest cached opts]
;; no need to bother with analysis cache reading, handled by
;; with-core-cljs
(when (or ana/*verbose* (:verbose opts))
(util/debug-prn "Using cached cljs.core" (str src)))
(spit dest (slurp cached))
(.setLastModified ^File dest (util/last-modified src))
(when (true? (:source-map opts))
(spit (io/file (str dest ".map"))
(json/write-str
(assoc
(json/read-str (slurp (io/resource "cljs/core.aot.js.map")))
"file"
(str (io/file (util/output-directory opts) "cljs" "core.js"))))))
(merge
(ana/parse-ns src dest nil)
{:out-file dest}))