cljs.repl.browser

since v0.0-927

-main - function
(-main & args)

add-in-order - function
(add-in-order {:keys [expecting fns]} order f)

browser-eval - function
(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.

browser-state - dynamic var

constrain-order - function
(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.

default-index - function
(default-index output-to)

es - dynamic var

ext->mime-type - var

handle-post - multimethod
(handle-post m _ _)

load-javascript - function
(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.

lock - var

mime-type->encoding - var

ordering - dynamic var

outs - var

repl-client-js - function
(repl-client-js)

repl-env - function
(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* - function
(repl-env* {:keys [output-dir host port], :or {host "localhost", port 9000}, :as opts})

run-in-order - function
(run-in-order {:keys [expecting fns]})

send-for-eval - function
(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 - function
(send-repl-client-page {:keys [path], :as request} conn opts)

send-static - function
(send-static {path :path, :as request} conn {:keys [static-dir output-dir host port gzip?], :or {output-dir "out"}, :as opts})

serve - function
(serve {:keys [host port output-dir], :as opts})

setup - function
(setup {:keys [working-dir launch-browser server-state], :as repl-env} {:keys [output-dir], :as opts})

thread-name - function
(thread-name)