UNPKG

@baseplate-dev/core-generators

Version:

Core generators for Baseplate

26 lines 1.11 kB
/** * Get the delimiters for a text template file. * @param filename The filename of the text template file. * @returns The delimiters for the text template file. */ export declare function getTextTemplateDelimiters(filename: string): { start: string; end: string; }; /** * Get the regex for a text template variable. We check for non-alphanumeric characters around the variable name. * * @param value The value of the variable. * @returns The regex for the text template variable. */ export declare function getTextTemplateVariableRegExp(value: string): RegExp; /** * Extract template variables from content by replacing variable values with template placeholders. * * @param contents The content to process. * @param variables The variables with their values to replace. * @param filename The filename for delimiter detection. * @returns The processed content with variables replaced by template placeholders. */ export declare function extractTemplateVariables(contents: string, variables: Record<string, string> | undefined, filename: string): string; //# sourceMappingURL=utils.d.ts.map