@nikovirtala/projen-typedoc
v1.0.113
Published
TypeDoc component for projen projects
Downloads
666
Readme
projen-typedoc
TypeDoc component for projen projects.
Installation
npm install @nikovirtala/projen-typedocUsage
Add the TypeDoc component to your projen project:
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();Default Configuration
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)
Configuration
Customize TypeDoc configuration:
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();Features
- Automatically installs TypeDoc as a dev dependency
- Creates
typedoc.jsoncconfiguration file - Adds
typedoctask to generate documentation - Supports all TypeDoc configuration options
Tasks
The component creates the following task:
typedoc- Generate TypeDoc documentation
License
MIT
