Public Variables and Functions
build-index
function
Usage: (build-index deps)
Index a list of dependencies by namespace and file name. There can
be zero or more namespaces provided per file. Upstream foreign libraies
will have their options merged with local foreign libraries to support
fine-grained overriding.
dependency-order
function
Usage: (dependency-order coll)
Topologically sort a collection of dependencies.
find-classpath-lib
function
Usage: (find-classpath-lib lib)
Given [lib], a string or symbol naming a goog-style JavaScript library
(i.e. one that uses goog.provide and goog.require), look for a resource on the
classpath corresponding to [lib] and return a map via `library-graph-node`
that contains its relevant metadata. The library found on the classpath
_must_ contain a `goog.provide` that matches [lib], or this fn will return nil
and print a warning.
find-js-classpath
function
Usage: (find-js-classpath path)
Returns a seq of URLs of all JavaScript files on the classpath.
find-js-fs
function
Usage: (find-js-fs path)
finds js resources from a path on the files system
find-js-jar
function
Usage: (find-js-jar jar-path lib-path)
Returns a seq of URLs of all JavaScript resources in the given jar
find-url
function
Usage: (find-url path-or-url)
Given a string, returns a URL. Attempts to resolve as a classpath-relative
path, then as a path relative to the working directory or a URL string
goog-dependencies*
function
Usage: (goog-dependencies*)
Create an index of Google dependencies by namespace and file name.
js-dependency-index
function
Usage: (js-dependency-index opts)
Returns the index for all JavaScript dependencies. Lookup by
namespace or file name.
load-foreign-library*
function
Usage: (load-foreign-library* lib-spec)
(load-foreign-library* lib-spec cp-only?)
Given a library spec (a map containing the keys :file
and :provides), returns a map containing :provides, :requires, :file
and :url
load-library*
function
Usage: (load-library* path)
Given a path to a JavaScript library, which is a directory
containing Javascript files, return a list of maps
containing :provides, :requires, :file and :url.
parse-js-ns
function
Usage: (parse-js-ns lines)
Given the lines from a JavaScript source file, parse the provide
and require statements and return them in a map. Assumes that all
provide and require statements appear before the first function
definition.