typedoc-plugin-lerna-packages-atj

0.2.1 • Public • Published

typedoc-plugin-lerna-packages

This fork adds:

  • compatibility with typedoc 0.17+ (dropped support for 0.16)
  • respect for the readme option

A plugin for Typedoc that groups all Lerna packages into own TS module. Normally Typedoc handles each file as a module, this isn't correct for lerna packages, as each package should be treated as a module. This plugins handles that. Also if you have a README.md in your package folder, it will be used as comment for that module.

Example Demo: https://marshal.marcj.dev/

Example source code: https://github.com/marcj/marshal.ts

Just install it and type typedoc:

npm i -D typedoc-plugin-lerna-packages typedoc@~0.16
# yarn add -D typedoc-plugin-lerna-packages typedoc@0.16 --tilde 
 
npx typedoc
# yarn typedoc 

Example typedoc.js in your root folder

module.exports = {
  mode: 'modules',
  out: 'docs',
  exclude: ['**/node_modules/**', '**/*.spec.ts'],
  name: 'MY NAME',
  excludePrivate: true
};

Options

In typedoc.js you can add following extra config values to change the behavior of this plugin.

module.exports = {
  //...
 
  //exclude packages from being generated
  lernaExclude: ['@vendor/integration-tests', '@vendor/examples']
};

Development

When you work on this package you should link to it in a other lerna repo, and then execute following command to make generation working:

rm -rf docs && NODE_PRESERVE_SYMLINKS=1 ./node_modules/.bin/typedoc

/typedoc-plugin-lerna-packages-atj/

    Package Sidebar

    Install

    npm i typedoc-plugin-lerna-packages-atj

    Weekly Downloads

    0

    Version

    0.2.1

    License

    MIT

    Unpacked Size

    25.2 kB

    Total Files

    7

    Last publish

    Collaborators

    • atj