cljs.build.api/watch

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

Source docstring:
Given a source which can be compiled, watch it for changes to produce.
Source code @ clojurescript:src/main/clojure/cljs/build/api.clj
(defn watch
  ([source opts]
   (watch source opts
     (or (ana-api/current-state)
         (ana-api/empty-state
           (closure/add-externs-sources opts)))))
  ([source opts compiler-env]
   (watch source opts compiler-env nil))
  ([source opts compiler-env stop]
   (binding [ana/*cljs-warning-handlers* (:warning-handlers opts ana/*cljs-warning-handlers*)]
     (closure/watch source opts compiler-env stop))))