ts-to-md
v0.2.0
Published
Generate markdown docs from a typescript file
Downloads
2
Maintainers
Readme
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:
{test-name}.input.ts
- This is the input file being checked{test-name}.output.md
- This defines the expected output