cljs.build.api/build

functionsince v0.0-3208Edit
(build opts)
(build source opts)
(build source opts compiler-env)

Source docstring:
Given compiler options, produce runnable JavaScript. An optional source
parameter may be provided.
Source code @ clojurescript:src/main/clojure/cljs/build/api.clj
(defn build
  ([opts]
   (build nil opts))
  ([source opts]
   (build source opts
     (or
       (ana-api/current-state)
       (ana-api/empty-state
         ;; need to dissoc :foreign-libs since we won't know what overriding
         ;; foreign libspecs are referring to until after add-implicit-options
         ;; - David
         (closure/add-externs-sources (dissoc opts :foreign-libs))))))
  ([source opts compiler-env]
   (doseq [[unknown-opt suggested-opt] (util/unknown-opts (set (keys opts)) closure/known-opts)]
     (when suggested-opt
       (println (str "WARNING: Unknown compiler option '" unknown-opt "'. Did you mean '" suggested-opt "'?"))))
   (binding [ana/*cljs-warning-handlers* (:warning-handlers opts ana/*cljs-warning-handlers*)]
     (closure/build source opts compiler-env))))