contains the relevant fields within the configuration json file, that are used for configuring documentation generation.

interface CliDocsConfig {
    dir?: string;
    deno?: string;
    log?:
        | boolean
        | "none"
        | "basic"
        | "verbose";
    dryrun?: boolean;
    site?: string;
    preserveTemporary?: boolean;
    copy?: [source: string, destination: string][];
    text?: WritableFileConfig[];
    css?: string;
    typedoc?: Omit<TypeDocOptions, "entryPoints" | "out" | "skipErrorChecking">;
}

Hierarchy

  • Omit<CliArgs, "config">
    • CliDocsConfig

Properties

dir?: string

the desired output directory for the generated docs. if a relative path is provided, then it will be resolved as a path relative to Deno's current working directory. (which is generally where deno.json resides.)

deno?: string

the path to your deno.json file for this project. if a relative path is provided, then it will be resolved as a path relative to Deno's current working directory. (which is also where deno.json generally resides.)

log?:
    | boolean
    | "none"
    | "basic"
    | "verbose"

select logging level:

  • false or "none": skip logging (dnt itself will still log).
  • true or "basic": log what is being carried out at the top level.
  • "verbose": in addition to basic logging, it also logs which files/folders are being copied or generated.
  • undefined: unchange logging from previous state (which is "basic" by default).
dryrun?: boolean

enable dryrun if you wish for nothing to be written onto the the filesystem.

site?: string

the root subpath in the website of the documentation (where the readme goes). for instance, if your domain name is "www.example.com", and your documentation's root should be at "www.example.com/docs/", then this option should be set to "docs/" (leading and trailing slashes will be trimmed, i.e. this option is invariant of them). if you leave this option undefined, then the script will use your "deno.json" configuration's "repository" key to parse the github-url, and then assign the site's root subpath to your repository's name, so that it is compatible with github-pages. otherwise, if no "repository" is present in your "deno.json", then an empty string ("") will be assigned, so that the webpage's root is also the documentation pages' root.

preserveTemporary?: boolean

specify whether to preserve the intermediate temporary files created for document generation. the three temporary files that are generated for document generation, relative to "deno.json" directory are: package.json, tsconfig.json, and ./temp/custom.css.

copy?: [source: string, destination: string][]

a list of paths/glob patterns relative to the deno.json directory, that should be copied over to the build directory, at the specified path. note that if the source is a glob pattern, then its destination can only be a folder. moreover, folder sources and destinations must always end in a trailing slash (i.e. "./path/to/my/folder/")

[!CAUTION] be cautious with using glob patterns with folders, as it will generally give you a bad unexpected output. when using glob patterns, make sure to execute a dryrun of the build process with "verbose" logging, to ensure that you are getting your desired copy paths.

write (or append) additional text or binary files to the output build directory, at the specified relative destination. use the 3rd options item to specify text Deno.WriteFileOptions | writing options, such as "append" the new text, or permit the creation ("create") of new file if it doesn't exist, etc...

css?: string

add custom css styles to be applied to your rendered html pages.
you should provide the css content in string-text format here, and the buildDocs function will convert it to a css file in your "deno.json" directory. after that, its path will be provided to TypeDoc's TypeDocOptions.customCss property, which in turn will render the html documentation with the cutom css file referenced.

typedoc?: Omit<TypeDocOptions, "entryPoints" | "out" | "skipErrorChecking">

typedoc related additional documentation building options for you to configure.