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

typedoc-plugin-merge-modules

v6.1.0

Published

Plugin for TypeDoc that merges the content of modules.

Downloads

153,045

Readme

NPM Version Donate

typedoc-plugin-merge-modules

This is a plugin for TypeDoc that merges the content of modules.

Use cases:

  • If you want to document an entire application and not a library, you can specify all files that you want to have documented as entry points for TypeDoc and use this plugin to merge all modules into the project root removing the extra module layer.
  • If you want to merge the content of some modules in the TypeDoc output, you can use this plugin and module annotations in your files to specify which modules should be combined.

Example

Here is an example of how the navigation menu of TypeDoc's output changes when merging all modules into the project root using the plugin:

Example

Installation

This module can be installed using npm:

$ npm install typedoc-plugin-merge-modules --save-dev

The plugin requires TypeDoc version 0.26.0 or above to be installed. After installation you need to activate the plugin with a typedoc command line argument or inside your typedoc config file.

Here is an example using a JavaScript config file:

/** @type { import('typedoc').TypeDocOptionMap & import('typedoc-plugin-merge-modules').Config } */
module.exports = {
    out: "output",
    entryPointStrategy: "expand",
    entryPoints: ["input/module1.ts", "input/module2.ts"],
    tsconfig: "tsconfig.json",
    readme: "MAIN.md",
    plugin: ["typedoc-plugin-merge-modules"],
    mergeModulesRenameDefaults: true, // NEW option of TypeDoc added by this plugin
    mergeModulesMergeMode: "project", // NEW option of TypeDoc added by this plugin
};

After installation TypeDoc can be used normally and you can configure this plugin as described below.

Options

The following options are added to TypeDoc when the plugin is installed:

| Name & Format | Description | Default | | ------------- | ----------- | ------- | | mergeModulesRenameDefaults <boolean> | Defines if the plugin should rename default exports to their original name. | true | | mergeModulesMergeMode <"project"\|"module"\|"module-category"\|"off"> | Defines how the plugin should merge modules:"project" = The plugin merges the content of all modules into the project root."module" = The plugin merges modules with the same name. By default the filename is the module name, which you can overwrite using module comments."module-category" = Same as "module" but will only merge modules that have the same category."off" = Disables the plugin. | "project" |

When you set mergeModulesMergeMode to "module" OR "module-category" in combination with module comments you should add the tag @mergeTarget to the comment of the module whose comment should be used in the merge result.

Bugs

Please report bugs here. Thanks for your contribution!

Credits

Special thanks go to the following people that contributed to this project:

Donate

If you find this piece of software helpful, please consider a donation. Any amount is greatly appreciated.

Donate