Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

ts-to-md

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-to-md

Generate markdown docs from a typescript file

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

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

Keywords

typescript

FAQs

Package last updated on 11 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts