cljs.compiler.api/compile-file

functionsince v0.0-3255Edit
(compile-file src)
(compile-file src dest)
(compile-file src dest opts)
(compile-file state src dest opts)

Source docstring:
Compiles src to a file of the same name, but with a .js extension,
in the src file's directory.

With dest argument, write file to provided location. If the dest
argument is a file outside the source tree, missing parent
directories will be created. The src file will only be compiled if
the dest file has an older modification time.

Both src and dest may be either a String or a File.

Returns a map containing {:ns .. :provides .. :requires .. :file ..}.
If the file was not compiled returns only {:file ...}
Source code @ clojurescript:src/main/clojure/cljs/compiler/api.clj
(defn compile-file
  ([src]
   (compile-file src (closure/src-file->target-file src)))
  ([src dest]
   (compile-file src dest nil))
  ([src dest opts]
   (compile-file (or (ana-api/current-state) (ana-api/empty-state opts)) src dest opts))
  ([state src dest opts]
   (ana-api/with-state state
     (binding [ana/*cljs-warning-handlers* (:warning-handlers opts ana/*cljs-warning-handlers*)]
       (comp/compile-file src dest opts)))))