<script> link in the browser page, or a call to
webPage#injectJs in phantomJS. The compile
:foreign-libs options can not be used to provide the dependency, as there is no way for the compiler to know that jayq depends on the namespace provided by these options.
For the consumer of the library to use compiler
:optimizations other than
:whitespace, they will need to provide an
If the library is packaged with a
goog.provides call, then the consumer can not replace the version using
:libs [""] - the use of an explicit prefix in
:foreign-libs where the namespace is explicitly mapped.
For examples, the pprng library packages its dependency with a
goog.provides call, allowing the use of
:externs file as in the first case.
There are several assumptions in much of the documentation that I didn't see explicitly explained. I'll record these here for posterity.
A clojurescript library is always a source code library. There is no such thing as the linking of compiled clojurescript artifacts.
:libs, and a
require, you still access it through
require of the namespace specified by
goog.provide, or the namespace specified in the
The choice of compiler
Discuss this post here.