typedoc is a wrapper plugin for Nx workspaces to quickly setup documentation automation on your projects using typedoc. It is created, maintained, and released as open source under MIT license by a group of passionate individuals in Enio.
Install, and run it!
If you aren't familiar with typedoc, saying that typedoc is convenient is an understatement. If you are using TypeScript correctly, assigning types and interfaces, and commenting on what your code does - you can generate documentation on a static site.
Kudos to the author(s) and maintainer(s) of this brilliant library. We created this Nx wrapper plugin to solve our problem -maintaining several open-source projects is not easy, and certainly, any automation to make the code base maintainable is most welcomed.
Check out this quick demo on how to setup typedoc via this plugin and use it:
Getting Started
- Add the plugin to your Nx workspace:
npm install --save-dev @enio.ai/typedoc
- Run the following command at the root directory of your workspace, where
<project>
is the name of the project in the nx workspace you want to set up. If nx
is not setup globaly, you may want to add it as npm script first (see details below) or prefix with npx
when using npm. You can also run this command from the Nx Console extension for VSCode.
nx g @enio.ai/typedoc:config <project>
Generating Docs
Run the following command, where <project>
is the name of your project in the nx workspace.
npx nx run <project>:typedoc
Optionally, you can create an npm script on the package.json
file in the root folder of your nx workspace for convenience.
{
"scripts": {
"create.docs": "nx typedoc",
"setup.docs": "nx g @enio.ai/typedoc:config"
}
}
Then you could run commands:
// Generating documentation
npm run create.docs <project>
// Setting up typedoc in your project
npm run setup.docs <project>
By default, the documents are generated under: ./docs
relative to root directory of the workspace.
Configure Docs
This plugin includes sensible default configurations for best experience.
If you wish to further customize typedoc behavior in your Nx project you can;
- Update
typedoc.json
file in your project directory. - Update typedoc entry options in
nx.json
to apply consistent behavior when running the generate documentation command for your Nx projects.
Maintenance of this project is made possible by all the contributors and sponsors. If you'd like to sponsor this project and have your avatar or company logo appear below click here. 💖
(This list will be automatically generated in the future.)