🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

@princjef/api-documenter

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@princjef/api-documenter

Automatically generate markdown documentation pages for Typescript packages.

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
19
1800%
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 21 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts