Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vilicvane/docheat
A "cheating" tool that generates brief API references for TypeScript libraries with links to source code.
https://github.com/vilicvane/docheat
Last synced: 20 days ago
JSON representation
A "cheating" tool that generates brief API references for TypeScript libraries with links to source code.
- Host: GitHub
- URL: https://github.com/vilicvane/docheat
- Owner: vilicvane
- Created: 2016-09-28T14:45:12.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-08T13:11:17.000Z (about 7 years ago)
- Last Synced: 2024-11-29T03:25:07.641Z (25 days ago)
- Language: TypeScript
- Size: 43.9 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![NPM Package](https://badge.fury.io/js/docheat.svg)](https://www.npmjs.com/package/docheat)
# Docheat
Docheat is a "cheating" tool for libraries written in TypeScript, it generates
API references inside a markdown file with brief descriptions and links to
source code, i.e., cheating.This tool is developed for [villa](https://github.com/vilic/villa), a set
of promise utilities for `async`-`await`-ready environment. And currently it
supports **ONLY** exported **functions**, please check out the issue list to
see what might be coming next.Please understand it is **NOT** meant to generate detailed and well-organized
documentations.## Installation
```sh
yarn global add docheat
```## Usage and Example
**Note:** to understand the example, please read in the order suggested by step
numbers.> **1.** A docheat entry list starts with marker comment below:
> ``> **3.** And the following content is generated using docheat under
> current project folder with command `docheat demo/tsconfig.json`:#### [[+]](demo/bar.ts#L4) `bar(a: string, b: number): Promise`
A useless function for demonstration.
#### [[+]](demo/foo.ts#L4) `foo(a: string): Promise`+2
Another useless function with overloads for demonstration.
##### Overloads:
- `foo(b: number): Date`
- `foo(...args: T[]): T`> **2.** And ends with marker comment below:
> ``## Command Options
- **-t, --target:** Glob patterns of target markdown files, defaults to
`README,README.*`.
- **-l, --level:** Heading level of generated entries, defaults to `4`.
- **-b, --base-url:** Base url of source code links## License
MIT License.