(browser-eval form)
Given a string of JavaScript, evaluate it in the browser and return a map representing the result of the evaluation. The map will contain the keys :type and :value. :type can be :success, :exception, or :error. :success means that the JavaScript was evaluated without exception and :value will contain the return value of the evaluation. :exception means that there was an exception in the browser while evaluating the JavaScript and :value will contain the error message. :error means that some other error has occured.
(constrain-order order f)
Elements to be printed in the REPL will arrive out of order. Ensure that they are printed in the correct order.
(load-javascript repl-env provides url)
Accepts a REPL environment, a list of namespaces, and a URL for a JavaScript file which contains the implementation for the list of namespaces. Will load the JavaScript file into the REPL environment if any of the namespaces have not already been loaded from the ClojureScript REPL.
(repl-env & {:as opts})
Create a browser-connected REPL environment. Options: port: The port on which the REPL server will run. Defaults to 9000. launch-browser: A Boolean indicating whether a browser should be automatically launched connecting back to the terminal REPL. Defaults to true. working-dir: The directory where the compiled REPL client JavaScript will be stored. Defaults to ".repl" with a ClojureScript version suffix, eg. ".repl-0.0-2138". static-dir: List of directories to search for static content. Defaults to ["." "out/"]. src: The source directory containing user-defined cljs files. Used to support reflection. Defaults to "src/".
(repl-env* {:keys [output-dir host port], :or {host "localhost", port 9000}, :as opts})
(send-for-eval form return-value-fn)
(send-for-eval conn form return-value-fn)
Given a form and a return value function, send the form to the browser for evaluation. The return value function will be called when the return value is received.
(send-repl-client-page {:keys [path], :as request} conn opts)
(send-static {path :path, :as request} conn {:keys [static-dir output-dir host port gzip?], :or {output-dir "out"}, :as opts})
(setup {:keys [working-dir launch-browser server-state], :as repl-env} {:keys [output-dir], :as opts})