Module
PuduLangDocgen.Docset
A project folder loaded, built, and published
Types
| Name | Description |
|---|---|
Options |
Command-line choices layered over the configuration |
Loaded |
A project's folder and everything a build reads from it |
Functions
| Name | Description |
|---|---|
options |
Options that leave the configuration as written. |
load |
A project read from its configuration file with options applied. |
build |
A project built and, unless the run is dry, published incrementally. |
buildAll |
The site built and published, then a PDF for every table of contents that sets `pdf`. Unlike `pdf`, a missing renderer is a warning here, so sites build on machines without a browser. |
pdf |
The site built and published, then a PDF for every table of contents that sets `pdf`. |
metadata |
API metadata written as files beside the configuration, in each source's format. |
fingerprint |
A digest of every project file's path and content outside the output folder, which changes whenever a source the build reads changes. |
options
Options that leave the configuration as written.
Returns
load
fn load(configFile: Str, chosen: &Options) -> Result[Loaded, Array[Docgen.Diagnostic]]
A project read from its configuration file with options applied.
Parameters
configFileStrchosen&Options
Returns
Result[Loaded, Array[Docgen.Diagnostic]]
build
fn build(configFile: Str, chosen: &Options, extending: &Build.Extensions) -> Result[Docgen.Report, Array[Docgen.Diagnostic]]
A project built and, unless the run is dry, published incrementally.
Examples
Build the project in website with the default options and print its diagnostics:
match Docset.build("website/docgen.json", &Docset.options(), &Build.extensions()) {
case Ok(report) => {
for problem in report.diagnostics { let _said = Io.writeLine(Docgen.describe(&problem)) }
0
}
case Err(problems) => {
for problem in problems { let _said = Io.writeErrorLine(Docgen.describe(&problem)) }
1
}
}
See Library usage for options and extensions.
Parameters
configFileStrchosen&Optionsextending&Build.Extensions
Returns
Result[Docgen.Report, Array[Docgen.Diagnostic]]
buildAll
fn buildAll(configFile: Str, chosen: &Options) -> Result[(Docgen.Report, Array[Str]), Array[Docgen.Diagnostic]]
The site built and published, then a PDF for every table of contents that sets pdf. Unlike
pdf, a missing renderer is a warning here, so sites build on machines without a browser.
Parameters
configFileStrchosen&Options
Returns
Result[(Docgen.Report, Array[Str]), Array[Docgen.Diagnostic]]
fn pdf(configFile: Str, chosen: &Options) -> Result[Array[Str], Array[Docgen.Diagnostic]]
The site built and published, then a PDF for every table of contents that sets pdf.
Parameters
configFileStrchosen&Options
Returns
Result[Array[Str], Array[Docgen.Diagnostic]]
metadata
fn metadata(configFile: Str, chosen: &Options) -> Result[Array[Str], Array[Docgen.Diagnostic]]
API metadata written as files beside the configuration, in each source's format.
Parameters
configFileStrchosen&Options
Returns
Result[Array[Str], Array[Docgen.Diagnostic]]
fingerprint
fn fingerprint(configFile: Str, output: Str) -> Str
A digest of every project file's path and content outside the output folder, which changes whenever a source the build reads changes.
Parameters
configFileStroutputStr
Returns
Str