Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MarkdownTranspiler

The main class to create an HTML-like file from a markdown file.

Hierarchy

  • MarkdownTranspiler

Index

Constructors

constructor

Properties

Private fileCreator

fileCreator: FileCreator

Private parser

Methods

Private getFileName

  • getFileName(filepath: string): string

transpileFiles

  • transpileFiles(inputPattern: string, outputDir: string): Promise<void>
  • Transpiles files in batch (from file to file).

    Parameters

    • inputPattern: string

      A glob pattern for feeding input markdown files.

    • outputDir: string

      A single directory to output transpiled files. Note that the folder structure will be flatten. The output filenames will match the input ones.

    Returns Promise<void>

transpileText

  • transpileText(markdownContent: string, identifier?: undefined | string): string
  • Returns transpiled file content (from string to string).

    Parameters

    • markdownContent: string

      The markdown content to be transpiled.

    • Optional identifier: undefined | string

      (optional) Used for naming the component (if needed). If not provided, a random string will be generated.

    Returns string

Generated using TypeDoc