npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@princjef/api-documenter

v1.0.2

Published

Automatically generate markdown documentation pages for Typescript packages.

Downloads

89

Readme

@princjef/api-documenter

Build Status npm version

Automatic documentation of public APIs for Typescript packages.

This package is forked from @microsoft/api-documenter and is meant to be used alongside @microsoft/api-extractor. It has been updated with the following adjustments/capabilities:

  • Nested folder structure to more easily understand API structure and support declaration merging
  • Includes class and interface hierarchies with links to parent/child classes and interfaces
  • Inlines class/interface members with deep linking to reduce amount of navigation needed
  • Overrides automatically inherit documentation of superclass/interface members that are documented
  • Inlines inherited members for classes and interfaces to make the full contract viewable in one place
  • Fixes up the navigation breadcrumb to make the package entry point the homepage, rather than asusming that there will be multiple packages present

Usage

To use this package, you will typically want to install it alongside the API Extractor tool:

npm install --save-dev @microsoft/api-extractor @princjef/api-documenter

To get API Extractor to work with the documenter, you will need an api-extractor.json file like the following in your repository:

{
  "compiler": {
    "configType": "tsconfig",
    "rootFolder": "."
  },
  "project": {
    "entryPointSourceFile": "<your built .d.ts entry point>"
  },
  "apiJsonFile": {
    "enabled": true,
    "outputFolder": "./temp"
  }
}

With the configuration above, you can then generate your documentation by running:

api-extractor run && api-documenter --input ./temp --output <output folder>

Running this will output markdown files for your API to the folder specified. You can either use these output files directly or integrate it with a documentation site of your choosing.

Frequenetly Asked Questions

What documentation tags can I use?

This package relies on a slightly modified version of JSDoc comments called AEDoc. Work is ongoing to standardize this into a TSDoc specification.

Why am I seeing an error about a missing release tag?

API Extractor requires all exported items (classes, interfaces, types, namespaces, etc.), to be labeled with one of the four visibility filters (@public, @beta, @alpha, @internal) to make the usage explicit. If you want to get rid of the warning and include the item as a regular exported member, add the @public tag on its own line at the end of the doc comment for the item.

Contributing

See CONTRIBUTING.md for full contribution guidelines.