(asset-require? require)
(find-file npm require-from require)
(find-package {:keys [index-ref node-modules-dir] :as npm} package-name)
(find-package* {:keys [node-modules-dir] :as npm} package-name)
(find-package-for-file npm file)
(find-package-json file)
(find-package-main npm {:keys [package-dir package-json] :as package})
(find-package-require {:keys [node-modules-dir] :as npm} require)
(find-package-resource npm require)
(find-relative npm relative-to require)
(find-resource npm require-from require require-ctx)
(get-file-info {:keys [index-ref] :as npm} file)
(get-file-info* {:keys [compiler node-modules-dir project-dir] :as npm} file)
extract some basic information from a given file, does not resolve dependencies
extract some basic information from a given file, does not resolve dependencies
(js-resource-for-file npm
require
{:keys [file file-min] :as cfg}
{:keys [mode] :as require-ctx})
if we want to include something that is not on npm or we want a custom thing {"react" {:type :file :file "path/to/my/react.js"}}
if we want to include something that is not on npm or we want a custom thing {"react" {:type :file :file "path/to/my/react.js"}}
(js-resource-for-global require {:keys [global] :as pkg})
a dependency might come from something already included in the page by other means
a config like: {"react" {:type :global :global "React"}}
means require("react") returns the global React instance
a dependency might come from something already included in the page by other means a config like: {"react" {:type :global :global "React"}} means require("react") returns the global React instance
(maybe-convert-goog dep)
(read-package-json {:keys [index-ref] :as state} file)
this caches the contents package.json files since we may access them quite often when resolving deps
this caches the contents package.json files since we may access them quite often when resolving deps
(service? x)
(shadow-js-require {:keys [ns resource-config] :as rc})
(split-package-require entry)
@scoped/thing -> [@scoped/thing nil] @scoped/thing/foo -> [@scoped/thing foo] unscoped -> [unscoped nil] unscoped/foo -> [unscoped foo]
@scoped/thing -> [@scoped/thing nil] @scoped/thing/foo -> [@scoped/thing foo] unscoped -> [unscoped nil] unscoped/foo -> [unscoped foo]
(start {:keys [node-modules-dir] :as config})
(stop npm)
(test-file dir name)
(test-file-exts {:keys [extensions] :as npm} dir name)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close