0.2.0 • Published 1 year ago

ts-to-md v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

TypeScript to Markdown

Given a TS file, generate markdown documentation for all it's exports.

pnpm i ts-to-md

See API.md for an example output.

Usage

CLI

ts-to-md -i src/index.ts -o docs/index.md

See ts-to-md --help for more a list of options.

Node API

import { generate } from 'ts-to-md';

const markdown = generate({ inputFile: './index.ts' });

Development

pnpm i

All testing is done via simple E2E tests. To run them, run:

pnpm test

To create a test case, create two files:

  1. {test-name}.input.ts - This is the input file being checked
  2. {test-name}.output.md - This defines the expected output