Skip to content
This repository was archived by the owner on May 7, 2021. It is now read-only.

Latest commit

 

History

History
120 lines (78 loc) · 3.05 KB

ApiDox.md

File metadata and controls

120 lines (78 loc) · 3.05 KB

Generate node.js API markdown with dox

Source: lib/apidox/index.js

exports.ApiDox()

Reference to ApiDox.

Go: TOC | exports

exports.create()

Create a new ApiDox.

Return:

{object}

Go: TOC | exports

exports.extend(ext)

Extend ApiDox.prototype.

Parameters:

  • {object} ext

Return:

{object} Merge result.

Go: TOC | exports

ApiDox()

ApiDox constructor.

Usage:

var dox = require('apidox').create();
var markdown = dox
  .set('input', '/path/to/source.js')
  .set('output', '/path/to/output.md')
  .parse()
  .convert();

Configuration:

  • {string} input Source file to read
  • {string} inputText Alternative to input
  • {string|boolean} [inputTitle=input] Customize Source: ... link text
    • false: Omit Source: ... entirely from markdown
    • string: Set link text (does not affect link URL)
  • {string} output Markdown file to write

Properties:

  • {object} anchors Keys are object paths which already have anchors
    • For duplicate prevention
  • {array} comments Filtered dox-provided objects to convert
  • {string curSection Current section being converted, ex. 'Klass.prototype'.
  • {object} fileComment First dox-provided comment found in the file
  • {array} lines Markdown lines
  • {object} params Collected @param meta indexed by method name
    • {array} types Type names
    • {string} description First line
    • {array} overflow Additional lines
  • {object} returns Collected @return metadata indexed by method name
    • {array} types Type names
    • {string} description First line
    • {array} overflow Additional lines
  • {array} sees Collected @see lines
  • {array} toc Collected table-of-contents metadata objects
    • {string} title Link title
    • {string} url Link URL
  • {array} throws Collected @throws lines

Go: TOC

ApiDox.prototype.parse(file)

Parse the source file.

Parameters:

  • {string} file

Return:

{object} this

Go: TOC | ApiDox.prototype

ApiDox.prototype.convert()

Convert comments to markdown.

Return:

{string}

Go: TOC | ApiDox.prototype

—generated by apidox