TypeDoc component for projen projects
npm install @nikovirtala/projen-typedocTypeDoc component for projen projects.
``bash`
npm install @nikovirtala/projen-typedoc
Add the TypeDoc component to your projen project:
`typescript
import { TypeDoc } from "@nikovirtala/projen-typedoc";
import { javascript } from "projen";
const project = new javascript.NodeProject({
name: "my-project",
defaultReleaseBranch: "main",
});
new TypeDoc(project);
project.synth();
`
The component uses the following default configuration:
- entryPointStrategy: expand - Expects all entry points to be top-level directoriesout
- : docs/api - Output directory for generated documentationexclude
- : ["*/.test.ts"] - Excludes test files from documentationexcludePrivate
- : true - Excludes private members from documentationdisableSource
- : true - Disable links to source (to ensure deterministic build)
Customize TypeDoc configuration:
`typescript
import { EntryPointStrategy, TypeDoc } from "@nikovirtala/projen-typedoc";
import { javascript } from "projen";
const project = new javascript.NodeProject({
name: "my-project",
defaultReleaseBranch: "main",
});
new TypeDoc(project, {
version: "^0.28",
typeDocConfig: {
entryPointStrategy: EntryPointStrategy.EXPAND,
out: "docs/api",
exclude: ["*/.test.ts"],
excludePrivate: true,
name: "My Project",
theme: "default",
},
});
project.synth();
`
- Automatically installs TypeDoc as a dev dependency
- Creates typedoc.jsonc configuration filetypedoc
- Adds task to generate documentation
- Supports all TypeDoc configuration options
The component creates the following task:
- typedoc` - Generate TypeDoc documentation
MIT