(bundled-cljsjs-ns? name)
some cljsjs packages are already loaded e.g react in klipse app
some cljsjs packages are already loaded e.g react in klipse app
(bundled-ns? name)
Checks whether a namespace is present at run-time
Checks whether a namespace is present at run-time
(external-libs-files external-libs suffixes path)
returns a list of files provided list of external-libs and suffixes
returns a list of files provided list of external-libs and suffixes
Each runtime environment provides a different way to load a library. Received two arguments - a map and a callback function: The map will have the following keys:
:name - the name of the library (a symbol) :macros - modifier signaling a macros namespace load :path - munged relative library path (a string)
It is up to the implementor to correctly resolve the corresponding .cljs, .cljc, or .js resource (the order must be respected). If :macros is true, resolution should only consider .clj or .cljc resources (the order must be respected). Upon resolution the callback should be invoked with a map containing the following keys:
:lang - the language, :clj or :js :source - the source of the library (a string) :file - optional, the file path, it will be added to AST's :file keyword (but not in :meta) :cache - optional, if a :clj namespace has been precompiled to :js, can give an analysis cache for faster loads. :source-map - optional, if a :clj namespace has been precompiled to :js, can give a V3 source map JSON
If the resource could not be resolved, the callback should be invoked with nil.
Each runtime environment provides a different way to load a library. Received two arguments - a map and a callback function: The map will have the following keys: :name - the name of the library (a symbol) :macros - modifier signaling a macros namespace load :path - munged relative library path (a string) It is up to the implementor to correctly resolve the corresponding .cljs, .cljc, or .js resource (the order must be respected). If :macros is true, resolution should only consider .clj or .cljc resources (the order must be respected). Upon resolution the callback should be invoked with a map containing the following keys: :lang - the language, :clj or :js :source - the source of the library (a string) :file - optional, the file path, it will be added to AST's :file keyword (but not in :meta) :cache - optional, if a :clj namespace has been precompiled to :js, can give an analysis cache for faster loads. :source-map - optional, if a :clj namespace has been precompiled to :js, can give a V3 source map JSON If the resource could not be resolved, the callback should be invoked with nil.
(try-to-load-cljsjs-ns name src-cb)
Try to load the js file corresponding to a cljsjs package. For that, we have to convert the package name into a full path - hosted on this git repo: https://github.com/viebel/cljsjs-hosted
Try to load the js file corresponding to a cljsjs package. For that, we have to convert the package name into a full path - hosted on this git repo: https://github.com/viebel/cljsjs-hosted
(try-to-load-ns filenames
lang
src-key
src-cb
&
{:keys [transform can-recover?]
:or {transform identity can-recover? false}})
Tries to load one namespace from filenames. Will call the src-cb upon first success. If can-recover? is false, will call src-cb with nil if it cannot load any namespace. Returns :success if a nampespace was loaded otherwise, returns nil.
Tries to load one namespace from filenames. Will call the src-cb upon first success. If can-recover? is false, will call src-cb with nil if it cannot load any namespace. Returns :success if a nampespace was loaded otherwise, returns nil.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close