Package Exports
- vuepress-plugin-typedoc
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vuepress-plugin-typedoc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
vuepress-plugin-typedoc
A VuePress plugin to build API docs with typedoc and the typedoc-plugin-markdown.
What it does?
- Generates pages as part of the build.
- Adds Front Matter to pages.
- Generates sidebars config to enable navigation.
Installation
Install in the same location as the VuePress root directory.
This guide assumes that a VuePress project has been setup. See getting started docs.
npm install typedoc typedoc-plugin-markdown vuepress-plugin-typedoc --save-dev
Config
Add the plugin to .vuepress/config.js
and specify the required options (see options).
plugins: [
[
'vuepress-plugin-typedoc',
// Plugin / TypeDoc options
{
entryPoints: ['../src/index.ts'],
tsconfig: '../tsconfig.json'
},
],
],
TypeDoc will be bootstraped with the Vuepress dev
and build
cli commands:
"dev": "vuepress dev [targetDir]",
"build": "vuepress build [targetDir]",
Once built the docs will be available at /api
or equivalent out directory.
docs/ (Vuepress website root)
├── src/
│ └── .vuepress
│ │ └───config.js
│ │ └───dist/ (static site dir)
│ └── api/ (compiled typedoc markdown)
├── package.json
Options
TypeDoc options
To configure TypeDoc, pass any relevant TypeDoc options to the config.
At a minimum the entryPoints
and tsconfig
options will need to be set.
entryPoints: ['../src/index.ts'],
tsconfig: '../tsconfig.json'
Additional TypeDoc plugins will need to be explicitly set:
plugin:['typedoc-plugin-xyz']
Plugin options
Name | Default | Description |
---|---|---|
out |
"api" |
Output directory relative to docs directory. |
allReflectionsHaveOwnDocument |
false |
Output all reflections into seperate output files. |
hideInPageTOC |
false |
Do not render in-page table of contents items. |
sidebar.fullNames |
false |
Display full names with module path if applicable. |
sidebar.parentCategory |
"none" |
The parent category label for sidebar - (defaults to none - no parent category). |
Example config
plugins: [
[
'vuepress-plugin-typedoc',
{
// TypeDoc options
entryPoints: ['../src/index.ts'],
tsconfig: '../tsconfig.json',
// Plugin options
out: 'api',
sidebar: {
fullNames: true,
parentCategory: 'API',
},
},
],
],
Once built the docs will be available at /api
or equivalent out directory.