tsdoc2md.torn

0.0.20-alpha • Public • Published

tsdoc2md

convert typescript comments to markdown file.

Comments converting of Class, Property, Constructor and Method is implemented. More will come up soon.

Only support annotations @param, @returns, @example.

Please follow typescript doc comment syntax: Doc comment syntax

Demo

tsdoc2md-demo

Install

npm install -g tsdoc2md

Usage

step1

generate config file named 'tsdoc2md.json'

// tsdoc2md.json
{
  "entry": {
    "README": "/lib/index.d.ts"
  },
  "outDir": "/docs/"
}
/**
* 1. key of entry will be name of markdown file.
* 2. entry file should be a declaration file. 
*/

your tsconfig shoud be:

// tsconfig.json
{
  ...
  "declaration": true,
  "declarationMap": true,
  "outDir": "lib"
  ...
}

step2

execute command

# use in terminal 
tsdoc2md

Readme

Keywords

Package Sidebar

Install

npm i tsdoc2md.torn

Weekly Downloads

1

Version

0.0.20-alpha

License

MIT

Unpacked Size

78.6 kB

Total Files

77

Last publish

Collaborators

  • torns