0.7.0 • Published 5 years ago
@metarhia/doc v0.7.0
Metarhia Documentation Generator
Installation
$ npm install -g @metarhia/docCli usage
metadoc [options] file.js [file.js...]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--header header for the resulting doc file [string]
--footer footer for the resulting doc file [string]
--header-file file with header for the resulting doc file [string]
--footer-file file with footer for the resulting doc file [string]
--write-to-stdout, -o write output to stdout instead of files [boolean]
--output-dir, -d output directory for separate doc files [string]
--output-file, -f output directory for merged doc file [string]
--config, -c custom config file [string]API
Table of Contents
introspect(namespace, text)
Returns: <Map> hash of hash of records,
{ title, description, parameters, comments }
Introspect interface
parseSignature(fn, text, start)
fn:<Function>|<RegExp>to be searchedtext:<string>to be searched instart:<number>position to start searching from
Returns: <Object> function signature
title:<string>short function descriptiondescription:<string>extended function descriptionargsSignature:<string>custom function signatureparameters:<Object[]>function parameters,{ name, types, nonStandardTypes, comment, offset }comments:<Object[]>comments about returned value, thrown errors, deprecation and usage,{ name, types, nonStandardTypes, comment }
Parse function signature
generateMd(inventory, options)
inventory:<Map>hash of map of records,{ method, title, parameters }options:<Object>header:<string>text before api documentationfooter:<string>text after api documentationcustomTypes:<string[]>custom typescustomLinks:<Array[]>custom types links
Returns: <string> md document
Generate md from interfaces inventory
Contributors
See GitHub for a full list of contributors
License
Licesed under MIT license. Copyright (c) 2018 Metarhia contributors