cljs.compiler.api/compile-root

functionsince v0.0-3255Edit
(compile-root src-dir)
(compile-root src-dir target-dir)
(compile-root src-dir target-dir opts)
(compile-root state src-dir target-dir opts)

Source docstring:
Looks recursively in src-dir for .cljs files and compiles them to
.js files. If target-dir is provided, output will go into this
directory mirroring the source directory structure. Returns a list
of maps containing information about each file which was compiled
in dependency order.
Source code @ clojurescript:src/main/clojure/cljs/compiler/api.clj
(defn compile-root
  ([src-dir] (compile-root src-dir "out"))
  ([src-dir target-dir] (compile-root src-dir target-dir nil))
  ([src-dir target-dir opts]
   (compile-root (or (ana-api/current-state) (ana-api/empty-state opts)) src-dir target-dir opts))
  ([state src-dir target-dir opts]
   (ana-api/with-state state
     (binding [ana/*cljs-warning-handlers* (:warning-handlers opts ana/*cljs-warning-handlers*)]
       (comp/compile-root src-dir target-dir opts)))))