Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsdoc-to-markdown

Package Overview
Dependencies
Maintainers
1
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsdoc-to-markdown

Markdown API documentation generator, good for Github projects

  • 0.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
147K
decreased by-16.59%
Maintainers
1
Weekly downloads
 
Created

What is jsdoc-to-markdown?

The jsdoc-to-markdown npm package is a tool that generates markdown documentation from JSDoc comments in your JavaScript code. It is useful for creating comprehensive and readable documentation for your projects.

What are jsdoc-to-markdown's main functionalities?

Generate Markdown Documentation

This feature allows you to generate markdown documentation from JSDoc comments in your JavaScript files. The code sample demonstrates how to use jsdoc-to-markdown to read JSDoc comments from JavaScript files in the 'src' directory and output the generated markdown to 'docs/api.md'.

const jsdoc2md = require('jsdoc-to-markdown');
const fs = require('fs');

const inputFiles = 'src/**/*.js';
const outputFile = 'docs/api.md';

jsdoc2md.render({ files: inputFiles })
  .then(output => fs.writeFileSync(outputFile, output));

Customizing the Output

This feature allows you to customize the output of the generated markdown documentation using a template. The code sample shows how to use a custom template to format the documentation for a specific module.

const jsdoc2md = require('jsdoc-to-markdown');
const fs = require('fs');

const inputFiles = 'src/**/*.js';
const outputFile = 'docs/api.md';

const template = `{{#module name="myModule"}}{{>docs}}{{/module}}`;

jsdoc2md.render({ files: inputFiles, template: template })
  .then(output => fs.writeFileSync(outputFile, output));

Filtering Output

This feature allows you to filter the output of the generated markdown documentation. The code sample demonstrates how to disable GitHub Flavored Markdown (GFM) in the output by setting the 'no-gfm' option to true.

const jsdoc2md = require('jsdoc-to-markdown');
const fs = require('fs');

const inputFiles = 'src/**/*.js';
const outputFile = 'docs/api.md';

jsdoc2md.render({ files: inputFiles, 'no-gfm': true })
  .then(output => fs.writeFileSync(outputFile, output));

Other packages similar to jsdoc-to-markdown

Keywords

FAQs

Package last updated on 09 Jul 2014

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc