@enio.ai/typedoc

中文文档
1.0.8发布于 2023/03/06MITTypeScriptCommonJS近 30 天下载 4631

Generator to setup Nx projects with documentation automation using typedoc

原始使用文档
文档目录6 节
  1. Install, and run it!
  2. Getting Started
  3. Generating Docs
  4. Configure Docs
  5. Contributors
  6. Sponsors

npm NPM npm GitHub contributors (via allcontributors.org) GitHub Sponsors

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

  1. Add the plugin to your Nx workspace:
npm install --save-dev @enio.ai/typedoc
  1. 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;

  1. Update typedoc.json file in your project directory.
  2. Update typedoc entry options in nx.json to apply consistent behavior when running the generate documentation command for your Nx projects.

Contributors


Sponsors

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.)

版本与发布记录

@enio.ai/typedoc 共发布 9 个版本,首次发布于 2022/11/14;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.8latest2023/03/063 年前
1.0.72023/03/053 年前
1.0.62023/01/163 年前
1.0.52023/01/053 年前
1.0.32022/12/303 年前
1.0.22022/11/183 年前

关于 @enio.ai/typedoc 的常见问题

@enio.ai/typedoc 是什么?

Generator to setup Nx projects with documentation automation using typedoc

如何安装 @enio.ai/typedoc?

在项目目录运行 npm install @enio.ai/typedoc,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:typedoc(^0.23.26)、typedoc-plugin-rename-defaults(^0.6.4)、typedoc-theme-hierarchy(^3.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@enio.ai/typedoc 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@enio.ai/typedoc 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@enio.ai/typedoc 可以商用吗?

@enio.ai/typedoc 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@enio.ai/typedoc 的下载量有多少?

根据 npm 官方下载统计,@enio.ai/typedoc 在 2026/10/14 – 2026/11/12 这 30 天内被下载 4,631 次,日均约 154 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@enio.ai/typedoc 还在维护吗?

最新版本 1.0.8 发布于 2023/03/06(3 年前);至今共发布 9 个版本,其中过去 12 个月发布了 0 个;首次发布于 2022/11/14。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。