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 🙏

© 2026 – Pkg Stats / Ryan Hefner

autogenerate-readme

v1.1.0

Published

A NodeJs package for generating a readme file from jsdoc comments embedded in your application source. This README file was generated using autogenerate-readme.

Downloads

25

Readme

autogenerate-readme

A NodeJs package for generating a readme file from jsdoc comments embedded in your application source. This README file was generated using autogenerate-readme.

Installation

To install this package run

npm install autogenerate-readme

Configuration

autogenerate-readme allows the following configuration options

| Option | Type | Description | | --- | --- | --- | | srcFiles | Array | An array of glob patterns to pull jsdoc comments from. | | template | string | The path to a README.md handlebars template. |

These configuration options may be set in the package.json file at the root of your project, or if omitted autogenerate-readme will use a set of default values.

each option with its default values is shown in the example package.json below:

{
    "name": "example project"
    "autogenerate-readme": {
        "srcFiles": ["./src/**/*.js"],
        "template": "./docs/README.md.hbs"
    }
}

Note: All paths should be relative to the package.json file.

Generating Bitbucket Style output

Bitbucket uses the safe version of markdown which does not allow html tags. To generate your project in this style add the following to your package.json

{
    "name": "example project"
    "autogenerate-readme": {
        "use-bitbucket": true
    }
}

Running

Warning: Running the generation will overwrite any existing README.md file.

To run the generation add the following to your package.json scripts file

    {
        "name": "example project"
        "scripts": {
            "docs": "gen-docs"
        }
    }

Then run:

yarn run docs

When the script completes the compiled README.md will exist at the root level of your project.

Package Docs

Functions

createReadmeTemplate(templatePath) ⇒ Promise.<HandlebarsTemplate>

Creates a handlebars template for rendering the README.md, will default to the api output if no readme file is found at the given path.

Kind: global function
Returns: Promise.<HandlebarsTemplate> - - a handlebars template with an api variable.

| Param | Type | Description | | --- | --- | --- | | templatePath | string | Path to the readme path,. |

generateReadme() ⇒ Promise.<void>

Generates a README.md file at the root project directory, with compiled jsdoc comments embedded.

Kind: global function

getOptions() ⇒ object

Reads in the options with the package.json info from either the current working directory or its parents, and returns the source file patterns and readme template with the configured values or default values.

Kind: global function

getPackageJSON(options) ⇒ object

Recursively searches for a package.json file starting at options.startPath, and stops when it finds a package.json file or attempts to recurse a 6th level.

Kind: global function
Returns: object - The package.json configuration, and the mainPath for the module.

| Param | Type | Description | | --- | --- | --- | | options | object | | | options.startPath | string | Starting path to look for a package.json file. | | options.depth | number | The recursive depth of the call (used to break out of the recursive calls after 5 levels). |

writeReadmeFile(options) ⇒ Promise.<void>

Writes a README.md file at the main project directory.

Kind: global function

| Param | Type | Description | | --- | --- | --- | | options | object | | | options.mainPath | string | The main project directory | | options.data | string | Buffer | The Readme data to write out. |