1.0.1-beta • Published 4 years ago

dmd-readme v1.0.1-beta

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Installation

$ npm i dmd-readme --save
# or
$ yarn add dmd-readme

Usage

Description:

Pass the plug-in name to jsdoc2md or dmd:

jsdoc2md --plugin dmd-readme

This plugin is initially a fork from dmd-readable, which:

  • removes global indexes
  • places descriptions in block-quotes
  • adds more whitespace before headings
  • changes the delimiter for multiple types in param tables to a comma
  • adds alias output

config(path) ⇒ *

ParamTypeDescription
pathstringThe config path

Description:

Grabs configuration options

features()

Description:

Loads AVA test files located config.features

pkg(key) ⇒ *

See: docs.hbs for an example of how to use this function

ParamTypeDescription
keystringThe package property you want returned

Description:

Reads info from the package.json file.

prefixLines(string, replacer) ⇒ string

ParamTypeDescription
stringstringThe string to modify
replacerstringThe string to prefix to each line

Description:

Prefixes a string to the beginning of each line in the first string

stripJsdocComment(jsDocCommentBlock, replaceValue) ⇒ String

ParamTypeDescription
jsDocCommentBlockString
replaceValueStringValue with to replace comment blocks

Returns: String - The comment without the asterisks
Description:

Removes all asterisks and additional white spaces from JSDoc comments

Example

const jsDocSyntax = `/**
 * A JSDoc description
 *
 * Hello
 **\/`

 // => Outputs:
 // A JSDoc description
 //
 // Hello

jsCodeToMd(jsCode) ⇒ string

ParamType
jsCodeString

Description:

Converts given jsCode into markdown by stripping jsDoc comments


License

MIT

© 2020-present Martin Rafael Gonzalez tin@devtin.io