Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 1.1 KB

readme.md

File metadata and controls

52 lines (34 loc) · 1.1 KB

MkDocs to Typescript Converter

This has been thrown together in a sleepless night 🌙.

After digging into the georgeous Scriptable app I wanted to improve the developer experience by providing types for the Scriptable API. So all efforts have been a bit biased to my needs to parse the provided documentation.

Improvements

Some missing things that would be nice once another sleepless night comes around:

  • some unit tests
  • using e.g. ts-morph to build the AST
  • running it against some other generated docs
  • typings for the mkdocs json format (is there at least some schema out there?)

Installation

npm i -D @davidenke/mkdocs-ts

or

npm install --save-dev @davidenke/mkdocs-ts

or

pnpm install --dev @davidenke/mkdocs-ts

or

yarn add --dev @davidenke/mkdocs-ts

Usage

mkdocs-ts <input: file path or URL> <output: path to target file>

npm run mkdocs-ts ./example.json example.d.ts

or

npm run mkdocs-ts https://some.remote/example.json example.d.ts