typedoc vs jsdoc vs @compodoc/compodoc
Documentation Generation Tools Comparison
1 Year
typedocjsdoc@compodoc/compodocSimilar Packages:
What's Documentation Generation Tools?

Documentation generation tools are essential for developers to create, maintain, and publish documentation for their codebases. These tools automate the process of extracting comments and metadata from the source code, producing structured documentation that can be easily navigated and understood. They help improve code readability, facilitate onboarding of new developers, and ensure that the documentation stays up-to-date with the code. Each tool has its unique features and target audience, making it important to choose the right one based on the specific needs of a project.

Package Weekly Downloads Trend
Github Stars Ranking
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
typedoc2,135,7988,0662.1 MB76 days agoApache-2.0
jsdoc2,018,84815,2351.53 MB4477 months agoApache-2.0
@compodoc/compodoc377,9314,05711.8 MB1258 months agoMIT
Feature Comparison: typedoc vs jsdoc vs @compodoc/compodoc

Language Support

  • typedoc:

    TypeDoc is tailored for TypeScript, leveraging TypeScript's type system to produce accurate and detailed documentation, making it the best choice for TypeScript projects.

  • jsdoc:

    JSDoc supports JavaScript and can be used in various environments, including Node.js and browser-based applications, making it versatile for JavaScript projects.

  • @compodoc/compodoc:

    Compodoc is specifically designed for Angular applications, supporting Angular decorators and modules, making it ideal for Angular developers.

Output Formats

  • typedoc:

    TypeDoc primarily generates HTML documentation, focusing on providing a clean and organized view of TypeScript projects, including type information and relationships.

  • jsdoc:

    JSDoc can generate documentation in multiple formats, including HTML, Markdown, and JSON, offering flexibility in how documentation is presented and consumed.

  • @compodoc/compodoc:

    Compodoc generates static documentation in HTML format, which can be easily hosted and shared, providing a user-friendly interface for navigation.

Integration and Ecosystem

  • typedoc:

    TypeDoc works seamlessly with TypeScript projects and can be integrated into build systems like Gulp and Webpack, ensuring that documentation generation fits into the development workflow.

  • jsdoc:

    JSDoc is widely adopted and has a large ecosystem of plugins and tools, allowing for extensive customization and integration with various build processes.

  • @compodoc/compodoc:

    Compodoc integrates well with Angular CLI and other Angular tools, providing a smooth setup process and compatibility with Angular's ecosystem.

Customization and Extensibility

  • typedoc:

    TypeDoc provides some customization options, including themes and templates, but focuses more on generating accurate documentation based on TypeScript's type definitions.

  • jsdoc:

    JSDoc is highly customizable, allowing developers to define their own tags and templates, making it adaptable to various documentation needs.

  • @compodoc/compodoc:

    Compodoc offers limited customization options compared to others but provides a structured approach to documenting Angular applications.

Community and Support

  • typedoc:

    TypeDoc has a smaller but dedicated community, primarily focused on TypeScript, with good support available through GitHub and TypeScript-related forums.

  • jsdoc:

    JSDoc has a large and established community, with extensive documentation, tutorials, and resources available for users.

  • @compodoc/compodoc:

    Compodoc has a growing community, especially among Angular developers, with active contributions and support available through GitHub.

How to Choose: typedoc vs jsdoc vs @compodoc/compodoc
  • typedoc:

    Choose TypeDoc if you are using TypeScript and want to generate documentation that takes full advantage of TypeScript's type system, providing detailed and type-safe documentation.

  • jsdoc:

    Choose JSDoc if you are working primarily with JavaScript and need a widely-used, flexible tool that supports various JavaScript environments and can generate documentation in multiple formats.

  • @compodoc/compodoc:

    Choose Compodoc if you are working with Angular applications and need a comprehensive documentation solution that integrates seamlessly with Angular's architecture and features.

README for typedoc

TypeDoc

Documentation generator for TypeScript projects.

Documentation

For more detailed documentation, the changelog, and TypeDoc documentation rendered with TypeDoc, see https://typedoc.org.

Installation

TypeDoc runs on Node.js and is available as a NPM package.

npm install typedoc --save-dev

Usage

To generate documentation TypeDoc needs to know your project entry point and TypeScript compiler options. It will automatically try to find your tsconfig.json file, so you can just specify the entry point of your library:

typedoc src/index.ts

If you have multiple entry points, specify each of them.

typedoc package1/index.ts package2/index.ts

If you specify a directory, TypeDoc will use the entryPointStrategy option to determine how to resolve it. By default, TypeDoc will search for a file called index under the directory.

Monorepos / Workspaces

If your codebase is comprised of one or more npm packages, you can build documentation for each of them individually and merge the results together into a single site by setting entryPointStrategy to packages. In this mode TypeDoc requires configuration to be present in each directory to specify the entry points. For an example setup, see https://github.com/Gerrit0/typedoc-packages-example

Arguments

For a complete list of the command line arguments run typedoc --help or visit our website.

  • --out <path/to/documentation/>
    Specifies the location the documentation should be written to. Defaults to ./docs
  • --json <path/to/output.json>
    Specifies the location and file name a json file describing the project is written to. When specified no documentation will be generated unless --out is also specified.
  • --options
    Specify a json option file that should be loaded. If not specified TypeDoc will look for 'typedoc.json' in the current directory.
  • --tsconfig <path/to/tsconfig.json>
    Specify a typescript config file that should be loaded. If not specified TypeDoc will look for 'tsconfig.json' in the current directory.
  • --exclude <pattern>
    Exclude files by the given pattern when a path is provided as source. Supports standard minimatch patterns.

Theming

  • --theme <default|plugin defined theme>
    Specify the theme that should be used.
  • --name <Documentation title>
    Set the name of the project that will be used in the header of the template.
  • --readme <path/to/readme|none>
    Path to the readme file that should be displayed on the index page. Pass none to disable the index page and start the documentation on the globals page.

Miscellaneous

  • --version
    Display the version number of TypeDoc.
  • --help
    Display all TypeDoc options.

Contributing

This project is maintained by a community of developers. Contributions are welcome and appreciated. You can find TypeDoc on GitHub; feel free to open an issue or create a pull request: https://github.com/TypeStrong/typedoc

For more information, read the contribution guide.