Utility functions :)
These are available in the analysis environment and thus should work without any additional dependencies or further assumptions about what's on the classpath.
Utility functions :) These are available in the analysis environment and thus should work without any additional dependencies or further assumptions about what's on the classpath.
The -main of cljdoc.analysis.runner
will write files to this directory.
Be careful when changing it since that path is also hardcoded in the cljdoc-builder CircleCI configuration
The -main of `cljdoc.analysis.runner` will write files to this directory. Be careful when changing it since that path is also hardcoded in the [cljdoc-builder](https://github.com/martinklepsch/cljdoc-builder) CircleCI configuration
(infer-platforms-from-src-dir src-dir)
Given a directory src-dir
inspect all files and infer which
platforms the source files likely target.
Given a directory `src-dir` inspect all files and infer which platforms the source files likely target.
(normalize-git-url s)
Ensure that the passed string is a git URL and that it's using HTTPS
Ensure that the passed string is a git URL and that it's using HTTPS
(relativize-path s1 s2)
Remove the segments at the beginning of a path s2
that are identical
to the beginning segments of s1
. This is useful when wanting to render
relative links instead of absolute ones.
Example:
(relativize-path "doc/common-abc.html" "doc/common-xyz.html")
;; => "common-xyz.html"
Remove the segments at the beginning of a path `s2` that are identical to the beginning segments of `s1`. This is useful when wanting to render relative links instead of absolute ones. Example: ``` (relativize-path "doc/common-abc.html" "doc/common-xyz.html") ;; => "common-xyz.html" ```
(replant-ns base target)
Given a fully-qualified base
and a potentially relative target
namespace,
return the fully qualified version of target
. Assumes that all target
namespaces
with identical first segments to base
are already absolute.
Given a fully-qualified `base` and a potentially relative `target` namespace, return the fully qualified version of `target`. Assumes that all `target` namespaces with identical first segments to `base` are already absolute.
(uri-path uri)
Return path part of a URL, this is probably part of pedestal in some way but I couldn't find it fast enough. TODO replace.
Return path part of a URL, this is probably part of pedestal in some way but I couldn't find it fast enough. TODO replace.
(variance coll)
Returns the variance for a collection of values.
Returns the variance for a collection of values.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close