Type2DocFx
A tool to generate TypeScript API documentation for docfx.
Installation
Type2DocFx runs on Node.js and is available as an NPM package.
$ npm install @microsoft/type2docfx -g
Usage
Usage: type2docfx [options] <input> <outputFolder>
Generate TypeScript API documentation for docfx.
Arguments:
input input can be one of the following:
* a path to the typedoc JSON output
* a path to source code folder
* an `npm install` compatible package, e.g., a package name, a git repository, a gzipped tarball, an URL, a git repository, etc.
outputFolder The output directory to place generated artifact.
Options:
-V, --version output the version number
-h, --help display help for command
Example
Input a path to file.json (generated by typedoc)
type2docfx api.json out
Input a path to source code folder
type2docfx c:/code-repo out
Input a valid input that npm install
can leverage (a package name)
type2docfx typescript@4.8.4 out
Input a valid input that npm install
can leverage (a tarball file)
type2docfx c:/typescript-4.8.4.tgz out
Other
This tool will install the input package into the system temp folder. If this brings any issue, try to change the TEMP/TMP environment variable to use another folder.
License
Licensed under the Apache License 2.0.