You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

generate-docs

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generate-docs

function to generate a documentation file from source files.

1.1.1
latest
Source
npmnpm
Version published
Weekly downloads
1.1K
-0.65%
Maintainers
1
Weekly downloads
 
Created
Source

generate-docs

function to generate a documentation file from source files.

any jsdoc-style comment (starts with /**) is extracted and concatenated into the output file.

example:

// docs.js

const generateDocs = require("generate-docs").default;

generateDocs({
  paths: ["readme.src.md", "*.js"],
  output: "README.md"
});
<!-- readme.src.md -->

# My Cool Project

## API

<!-- TOC -->
// index.js

/**
 * ## add
 * add(1, 2) // => 3
 */

const add = (a, b) => a + b;
<!-- README.md -->

# My Cool Project

## API

<!-- toc -->

* [add](#add)

<!-- tocstop -->

## add

add(1, 2) // => 3

FAQs

Package last updated on 18 Mar 2018

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