doccomentation

1.1.1 • Public • Published

Doccomentation

A NodeJS plugin that allows JSDoc style comments to be extracted out of a file and either returned as a markdown string or inserted into a target Markdown file.

Installation

Can be installed via NPM with the command

npm install doccommentation --save-dev

Support

NodeJS 6+

Command Line

doccomentation --source 'src/**/*.js' --target 'README.md' --header 'API Documentation'

If the package is not installed the command line may not work. You will, however, always be able to run it as an NPM script (the "scripts" section in your package.json).

API Documentation

createMarkdown(params) ⇒ Promise

Creates markdown content from JSDoc comments existing in target files

Kind: global function
Returns: Promise - The markdown string generated from all the source JSDoc comments

ParamTypeDefaultDescription
paramsObject
params.sourcestring

The source files to inspect for JSDoc comments. The string can also use a globbing pattern

[params.target]string

A (markdown) file you wish to output the generated markdown to

[params.header]string

The header you wish to append the generated mardown under

[params.headerSize]string2

The size of the target header (1=#, 2=##, etc.)

Release Notes

v0.8.0

  • Initial release

v0.8.1

  • Add cli

v1.0.0

  • Updated documentation
  • Added unit tests
  • Minor refactoring following addition of unit tests

v1.0.1

  • Updated readme documentation
  • Run unit tests as CI step
  • Automated publication after successfull merge and test on Master

v1.0.2

  • Added reference to Github repository

v1.0.4

  • Updated readme doccumentation and security patches

v1.1.0

  • Fix injection of data into an existing markdown file
  • Some minor refactoring

v1.1.1

  • Minor tweaks to the render function

Package Sidebar

Install

npm i doccomentation

Weekly Downloads

1

Version

1.1.1

License

ISC

Unpacked Size

17 kB

Total Files

13

Last publish

Collaborators

  • tommichi