(dir? path)
Many Marginalia fns use dir? to recursively search a filepath.
Many Marginalia fns use dir? to recursively search a filepath.
(end-of-block? cur-group groups lines)
(ensure-directory! path)
Ensure that the directory specified by path
exists. If not then make it so.
Here is a snowman ☃
Ensure that the directory specified by `path` exists. If not then make it so. Here is a snowman ☃
(filename-contents props output-dir all-files parsed-file)
(find-file-extension file)
Returns a string containing the files extension.
Returns a string containing the files extension.
(find-processable-file-paths dir pred)
Returns a seq of processable file paths (strings) in alphabetical order by namespace.
Returns a seq of processable file paths (strings) in alphabetical order by namespace.
(format-sources sources)
Given a collection of filepaths, returns a lazy sequence of filepaths to all .clj, .cljs, .cljx, and .cljc files on those paths: directory paths will be searched recursively for files.
Given a collection of filepaths, returns a lazy sequence of filepaths to all .clj, .cljs, .cljx, and .cljc files on those paths: directory paths will be searched recursively for files.
(group-lines doc-lines)
(ls path)
Performs roughly the same task as the UNIX ls
. That is, returns a seq of the filenames
at a given directory. If a path to a file is supplied, then the seq contains only the
original path given.
Performs roughly the same task as the UNIX `ls`. That is, returns a seq of the filenames at a given directory. If a path to a file is supplied, then the seq contains only the original path given.
(merge-line line m)
(mkdir path)
(multidoc! output-dir files-to-analyze props)
(parse-project-file)
(parse-project-file path)
Parses a project file -- './project.clj' by default -- and returns a map assembled according to the logic in parse-project-form.
Parses a project file -- './project.clj' by default -- and returns a map assembled according to the logic in parse-project-form.
(parse-project-form [_ project-name version-number & attributes])
Parses a project.clj file and returns a map in the following form
{:name
:version
:dependencies
:dev-dependencies
etc...}
by merging into the name and version information the rest of the defproject
forms (:dependencies
, etc)
Parses a project.clj file and returns a map in the following form {:name :version :dependencies :dev-dependencies etc...} by merging into the name and version information the rest of the defproject forms (`:dependencies`, etc)
(path-to-doc fn)
(processable-file? pred file)
Predicate. Returns true for "normal" files with a file extension which passes the provided predicate.
Predicate. Returns true for "normal" files with a file extension which passes the provided predicate.
(run-marginalia args & [project])
Default generation: given a collection of filepaths in a project, find the .clj files at these paths and, if Clojure source files are found:
If no source files are found, complain with a usage message.
Default generation: given a collection of filepaths in a project, find the .clj files at these paths and, if Clojure source files are found: 1. Print out a message to std out letting a user know which files are to be processed; 1. Create the docs directory inside the project folder if it doesn't already exist; 1. Call the uberdoc! function to generate the output file at its default location, using the found source files and a project file expected to be in its default location. If no source files are found, complain with a usage message.
(source-excluded? source opts)
Check if a source file is excluded from the generated documentation
Check if a source file is excluded from the generated documentation
(split-deps deps)
(uberdoc! output-file-name files-to-analyze props)
Generates an uberdoc html file from 3 pieces of information:
output-file-name
)path-to-doc
)Generates an uberdoc html file from 3 pieces of information: 2. The path to spit the result (`output-file-name`) 1. Results from processing source files (`path-to-doc`) 3. Project metadata as a map, containing at a minimum the following: - :name - :version
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close