compile
functionv1.7
cljs.js/compile
(compile [state source cb] [state source name cb] [state source name opts cb])Compile ClojureScript source into JavaScript. The parameters:
state (atom)
the compiler state
source (string)
the ClojureScript source
name (symbol)
optional, the name of the source
opts (map)
compilation options.
:load - library resolution function, see *load-fn*
:source-map - set to true to generate inline source map information
cb (function)
callback, will be invoked with a map. If successful the map will contain
a key :value with the compilation result (string). If unsuccessful the map
will contain a key :error with an ex-info instance describing the cause
of failure.
Examples
No examples yet. Be the first to add one!