Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Tools\FilesContentHelpers

Index

Functions

canProcessFileExtension

  • canProcessFileExtension(directiveFullString: string, pathToFile: string, directiveName: string): SupportedFormats
  • Determines whether the path to a file passed to a built-in directive leads to a supported file or not.

    Parameters

    • directiveFullString: string

      full directive string, to be shown in the error message.

    • 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.

    Returns SupportedFormats

    the file extension.

getDirectiveValues

  • Gets directive values

    Parameters

    • fullDirectiveString: string

      full string of the directive to be parsed.

    • configOptions: YassbConfig

      full YASSB configuration Object.

    • directiveName: SupportedDirectives

      name of the directive in kebab case to identify the main value passed to the directive.

    • baseDir: keyof typeof WORKING_DIR

      full absolute base path to resolve the relative path passed to the directive.

    Returns DirectiveData

    all the directive values found as a DirectiveData object.

getFormattedContent