(dirs-on-classpath)
Return all dirs on classpath, filtering out our inlined deps directory and paths matching :ignore-paths specified in config. Follows the semantics of orchard classpath.
Return all dirs on classpath, filtering out our inlined deps directory and paths matching :ignore-paths specified in config. Follows the semantics of orchard classpath.
(extract-gen-class-methods-meta ns-form)
Retrieve the metadata relative to :methods in the :gen-class top level component.
Returns nil if there is no :gen-class, or if there is no :methods inside :gen-class
.indexOf returns -1 if not found, and since the structure we are looking for comes after, by 'incing' by default we can just check for zero?
Retrieve the metadata relative to :methods in the :gen-class top level component. Returns nil if there is no :gen-class, or if there is no :methods inside :gen-class .indexOf returns -1 if not found, and since the structure we are looking for comes after, by 'incing' by default we can just check for zero?
(extract-ns-meta file-content)
Retrieve the metadata for the ns, if there is any.
By parsing the ns as a string, and reading the metadata off it, all the metadata introduced by the compiler or clojure.test is not printed back out
Retrieve the metadata for the ns, if there is any. By parsing the ns as a string, and reading the metadata off it, all the metadata introduced by the compiler or clojure.test is not printed back out
(file->dialect path-or-file)
Return the clojure dialect used in the file f.
The dialect is either :clj, :cljs or :cljc.
Return the clojure dialect used in the file f. The dialect is either :clj, :cljs or :cljc.
(file-content-sans-ns file-content)
(file-content-sans-ns file-content dialect)
Read the content of file after the ns.
Any whitespace in the file is preserved, including the conventional blank line after the ns form, before the rest of the file content.
The default value of dialect is :clj.
Read the content of file after the ns. Any whitespace in the file is preserved, including the conventional blank line after the ns form, before the rest of the file content. The default value of dialect is :clj.
(find-in-dir pred dir)
Searches recursively under dir for files matching (pred ^File file).
Note that files which are non-existent, hidden or build-artifacts are pruned by this function.
Searches recursively under dir for files matching (pred ^File file). Note that files which are non-existent, hidden or build-artifacts are pruned by this function.
(find-in-project pred)
(find-in-project pred dirs)
Return the files in the project satisfying (pred ^File file).
Return the files in the project satisfying (pred ^File file).
(fully-qualify ns name)
Create a fully qualified name from name and ns.
Create a fully qualified name from name and ns.
(get-ns-component ns type)
Extracts a sub-component from the ns declaration.
type is a toplevel keyword in the ns form e.g. :require or :use.
Extracts a sub-component from the ns declaration. type is a toplevel keyword in the ns form e.g. :require or :use.
(ns-form-from-string file-content)
(ns-form-from-string dialect file-content)
(ns-from-string file-content)
Retrieve the symbol naming the ns from file-content.
Retrieve the symbol naming the ns from file-content.
(ns-name-from-readable readable)
Call slurp on readable and extract the ns-name from the content.
Call slurp on readable and extract the ns-name from the content.
(path->namespace path)
(path->namespace no-error path)
Read the ns form found at PATH and return the namespace object for that ns.
if NO-ERROR is passed just return nil instead of an exception if we can't successfully read an ns form.
Read the ns form found at PATH and return the namespace object for that ns. if NO-ERROR is passed just return nil instead of an exception if we can't successfully read an ns form.
(prefix fully-qualified-name)
java.util.Date -> java.util
clojure.walk/walk -> clojure.walk :clojure.core/kw -> kw
java.util.Date -> java.util clojure.walk/walk -> clojure.walk :clojure.core/kw -> kw
(prefix-form? form)
Does the form represent a libspec using prefix notation like: [prefix libspec1 libspec2 ...] ?
Does the form represent a libspec using prefix notation like: [prefix libspec1 libspec2 ...] ?
(project-root)
(project-root path-or-file-in-project)
Return the project root directory.
If path-or-file-in-project is provided it should be a project file
to use as a starting point. We search anything above this dir, until
we reach the file system root. Default value is the property
user.dir
.
Return the project root directory. If path-or-file-in-project is provided it should be a project file to use as a starting point. We search anything above this dir, until we reach the file system root. Default value is the property `user.dir`.
(read-ns-form-with-meta path)
(read-ns-form-with-meta dialect path)
Read the ns form found at PATH.
Dialect is either :clj or :cljs.
Read the ns form found at PATH. Dialect is either :clj or :cljs.
(source-dirs-on-classpath)
Like #'dirs-on-classpath
, but restricted to dirs that look like
(interesting) source/test dirs.
Like `#'dirs-on-classpath`, but restricted to dirs that look like (interesting) source/test dirs.
(source-file? path-or-file)
True for clj, cljs or cljc files.
A list of data files are excluded, e.g. data_readers.clj. Files without ns form are excluded too.
True for clj, cljs or cljc files. A list of data files are excluded, e.g. data_readers.clj. Files without ns form are excluded too.
(source-files-with-clj-like-extension ignore-errors?)
(source-files-with-clj-like-extension ignore-errors? dirs)
Finds files with .clj* extension in the project, without inspecting them.
Meant as a particularly fast operation (as it doesn't slurp files).
Finds files with .clj* extension in the project, without inspecting them. Meant as a particularly fast operation (as it doesn't slurp files).
(strip-reader-macros symbol-or-string)
Strip reader macros like #' and . (as in '(Date.)') from symbol-or-string.
Strip reader macros like #' and . (as in '(Date.)') from symbol-or-string.
(suffix fully-qualified-name)
java.util.Date -> Date java.text.Normalizer$Form/NFD => Normalizer SomeClass$InnerClass$InnerInnerClass => SomeClass$InnerClass$InnerInnerClass SomeClass$InnerClass => SomeClass$InnerClass
clojure.core/str -> str
java.util.Date -> Date java.text.Normalizer$Form/NFD => Normalizer SomeClass$InnerClass$InnerInnerClass => SomeClass$InnerClass$InnerInnerClass SomeClass$InnerClass => SomeClass$InnerClass clojure.core/str -> str
(with-clojure-version->= {:keys [major minor] :as _clojure-version} & body)
Guard the evaluation of body
with a test on the current clojure version.
Guard the evaluation of `body` with a test on the current clojure version.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close