Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Tools

Index

Functions

fileDoesNotExists

  • fileDoesNotExists(pathToFile: string, directiveName: string, scope: "component" | "data-source"): boolean
  • Checks if a file exists.

    Parameters

    • pathToFile: string

      path to the file, needed to check if the file exists and is supported.

    • directiveName: string

      name of the directive, to be shown in the error message for better identification of the problem.

    • scope: "component" | "data-source"

      type of element to look for, either a component or a data source.

    Returns boolean

    true if does not exists

isValidJsonString

  • isValidJsonString(jsonString: string): boolean

logDone

  • logDone(what: string): void
    • Minimally formatted message for the console to show what steps of build process have finished.

    Parameters

    • what: string

      name of the step.

    Returns void

logStep

  • logStep(step: string): void
  • Minimally formatted message for the console to show the progress of the build process.

    Parameters

    • step: string

      where the build process is at.

    Returns void

mdTitleExtractor

  • mdTitleExtractor(mdContents: string): string
  • Extracts the first occurence of a level 1 title # [title] from a MarkDown file.

    Parameters

    • mdContents: string

      content of the MarkDown file.

    Returns string

    the title extracted, if any was found.