Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "lib/utils/parseTemplate"

Index

Functions

addInitialIndentation

  • addInitialIndentation(row: string, block: string): string
  • Given the row containing the template comment and a block of generated code, returns the block properly indented in relation with the indentation of the template comment.

    Parameters

    • row: string

      The row containing the template comment.

    • block: string

      The block of generated code.

    Returns string

    The the block properly indented in relation with the indentation of the template comment.

parseTemplate

  • parseTemplate(template: string, codes: Code[], options: Options): string
  • Given the content of a template file, the array of Code objects containing template comment and associated generated code and the options passed to the "generate" function, returns the content of the generated file.

    Parameters

    • template: string

      The content of a template file.

    • codes: Code[]

      The array of Code objects containing template comment and associated generated code.

    • options: Options

      The options passed to the "generate" function.

    Returns string

    The content of file generated from the template file.

Generated using TypeDoc