cljs.closure
Detailed API documentation
Compile ClojureScript to JavaScript with optimizations from Google
Closure Compiler producing runnable JavaScript.
The Closure Compiler (compiler.jar) must be on the classpath.
Use the 'build' function for end-to-end compilation.
build = find-sources -> add-dependencies -> compile -> optimize -> output
Two protocols are defined: IJavaScript and Compilable. The
Compilable protocol is satisfied by something which can return one
or more IJavaScripts.
With IJavaScript objects in hand, calling add-dependencies will
produce a sequence of IJavaScript objects which includes all
required dependencies from the Closure library and ClojureScript,
in dependency order. This function replaces the closurebuilder
tool.
The optimize function converts one or more IJavaScripts into a
single string of JavaScript source code using the Closure Compiler
API.
The produced output is either a single string of optimized
JavaScript or a deps file for use during development.
Contents:
->JavaScriptFile -compile -find-sources -paths -source-map -source-url add-dep-string add-dependencies add-dependency-sources add-js-sources add-preloads build build-modules build-provides cljs-dependencies cljs-source-for-namespace Compilable compile compile-dir compile-file compile-form-seq compile-from-jar compile-sources compiled-file convert-js-module deps-file emit-optimized-source-map find-cljs-dependencies get-compiled-cljs get-upstream-deps* Inputs ISourceMap jar-file-to-disk JavaScriptFile js-dependencies js-transforms known-opts load-externs make-options map->JavaScriptFile optimize optimize-modules output-modules output-unoptimized path-from-jarfile path-relative-to process-js-modules read-js rel-output-path set-options source-for-namespace source-on-disk watch write-javascript write-js?
cljs.env
Detailed API documentation
A namespace that exists solely to provide a place for "compiler"
state that is accessed/maintained by many different components.
Contents:
with-compiler-env
Variables and functions in
cljs.env.macros:
with-compiler-env