神刀安全网

Automatic API readme generator for TypeScript projects

docts

Automatic API readme generator for TypeScript projects Automatic API readme generator for TypeScript projects

This is a command-line tool to generate API documentation for TypeScript projects based on information about types and exported declarations extracted usingreadts. Run docts inside your package and it parses the .d.ts files referenced from the typings key of your package.json . Then it replaces any section titled API in your README.md file with new automatically generated content. For an example of its output, see theAPIsection below.

Any additional TypeScript configuration should be defined in tsconfig.json in the root if your package.

Usage

Start by making a backup of your README.md .

Then install:

npm install --save docts

Make sure your package.json has a typings section and add in the scripts section:

"scripts": {     "docts": "docts"   }

Finally run:

npm run docts

API

Class Section

Methods:

new( )

Section

Properties:

.header string[]

.content string[]

.name string

Class Markdown

Methods:

new( )

Markdown

▪ markdownPath string

.readSections( )

Section[]

.writeSections( ) void

▪ sectionList

Section[]

Properties:

.path string

License

The MIT License

Copyright (c) 2016 BusFaster Ltd

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Automatic API readme generator for TypeScript projects

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
分享按钮