0.0.4 • Published 4 years ago

mtdoc v0.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

mtdoc

A markdown to TypeScript compiler with live code block.

CLI

Options:
      --version   Show version number                                  [boolean]
  -f, --file                                                  [array] [required]
  -t, --template                                             [string] [required]
  -w, --watch                                         [boolean] [default: false]
  -p, --parallel                                           [number] [default: 8]
  -h, --help      Show help                                            [boolean]

Examples:
  mtdoc.ts -t tpl.tsx -f 'src/**/*.md'                 Compile markdown files
  mtdoc.ts -t tpl.tsx --watch -f 'src/**/*.md'         Compile and watch changes

API

// Do a batch compile, and optionally watch changes after initial compile
function compileMarkdown(options: CompileMarkdownOptions): void;

// Compile one markdown file
function compileOneMarkdown(file: string, template: string): Promise<MarkdownCompilerResult>;