@appium/typedoc-plugin-appium

中文文档
0.6.6发布于 2023/08/18Apache-2.0TypeScriptCommonJS近 30 天下载 5.1万

TypeDoc plugin for Appium & its extensions

原始使用文档
文档目录12 节
  1. Overview
  2. Important Note
  3. Installation
  4. Usage
  5. Options
  6. outputModules
  7. outputBuiltinCommands
  8. packageTitles
  9. commandsDir
  10. forceBreadcrumbs
  11. Development
  12. License

@appium/typedoc-plugin-appium

TypeDoc plugin for Appium & its extensions

Overview

This package leverages TypeDoc to generate command documentation (HTTP endpoints, payload information, etc.) for Appium v2+ drivers and plugins.

Important Note

If you are an Appium extension author and just want to build HTML docs, don't install this directly--instead, install @appium/docutils, which is a higher-level package that configures everything for you.

If you only want to build markdown docs for your extension, then you can use this package directly.

Installation

npm v8+ is required to install this package.

npm install @appium/typedoc-plugin-appium --save-dev

The above command installs the plugin as well as all necessary peer dependencies. See package.json for the full list of dependencies.

Usage

TypeDoc is configured via a typedoc.json or typedoc.js file (read the docs for more information).

An Appium extension author wishing to generate markdown documentation for their extension will need to create a typedoc.json. At minimum, it should contain:

{
  "entryPointStrategy": "packages",
  "entryPoints": ["."],
  "name": "<name of extension>",
  "theme": "appium",
  "out": "<path to output directory>"
}

Once this file is created, you can run typedoc to generate the documentation, and it will be output into the out directory as configured above.

Options

This plugin supports all of the options from typedoc-plugin-markdown, as well as the following:

outputModules

boolean - Output module, class, interface, and other type information (the usual TypeDoc output) in addition to command documentation. This is needed for full documentation of types. Default value: true

outputBuiltinCommands

boolean - Outputs all commands and types from Appium builtins--not just your extension. This is intended to be used by Appium itself. Default value: false

packageTitles

Array<{name: string, title: string}>: An array of objects containing module name name and display name title. By default, the module name is used for the title; use this to override that behavior. Default value: undefined

commandsDir

string - The name of the "commands" directory relative to the TypeDoc output directory (out). Default value: commands

forceBreadcrumbs

boolean - Forces breadcrumbs to be output; overrides hideBreadcrumbs from typedoc-plugin-markdown. Default value: false

Development

This packages uses snapshot tests to assert the generated markdown is correct. If you have made changes which affect the plugin's output, you will need to update the snapshots.

To update the snapshots, execute:

UPDATE_SNAPSHOT=1 npm run test:e2e

This will (likely) modify the snapshots in your working copy, so you will then need to commit them.

License

Copyright © 2022 OpenJS Foundation. Licensed Apache-2.0

版本与发布记录

@appium/typedoc-plugin-appium 共发布 19 个版本,首次发布于 2022/12/14;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.6.6latest2023/08/183 年前
0.6.52023/06/153 年前
0.6.42023/05/183 年前
0.6.32023/04/193 年前
0.6.22023/04/133 年前
0.6.12023/04/113 年前

关于 @appium/typedoc-plugin-appium 的常见问题

@appium/typedoc-plugin-appium 是什么?

TypeDoc plugin for Appium & its extensions

如何安装 @appium/typedoc-plugin-appium?

在项目目录运行 npm install @appium/typedoc-plugin-appium,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:appium(^2.0.0-beta.48)、typedoc(~0.23.14)、typescript(^4.7.0 || ^5.0.0)、typedoc-plugin-markdown(3.14.0)、typedoc-plugin-resolve-crossmodule-references(~0.3.3)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@appium/typedoc-plugin-appium 支持 TypeScript 吗?

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

@appium/typedoc-plugin-appium 支持 ESM 还是 CommonJS?

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

@appium/typedoc-plugin-appium 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js ^14.17.0 || ^16.13.0 || >=18.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@appium/typedoc-plugin-appium 可以商用吗?

@appium/typedoc-plugin-appium 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@appium/typedoc-plugin-appium 的下载量有多少?

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

@appium/typedoc-plugin-appium 还在维护吗?

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