Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/entropy/src/templates/template_compiler.service.ts>TemplateCompiler

The core module of Entropy framework for Deno.
Latest
class TemplateCompiler
import { TemplateCompiler } from "https://deno.land/x/entropy@1.0.0-beta.17/src/templates/template_compiler.service.ts";

Constructors

new
TemplateCompiler()

Properties

private
readonly
configurator
private
readonly
encrypter
private
readonly
functions: { $env; $escape; $inject; $range; $url; }
private
optional
layout: string
private
optional
layoutFile: string
private
layoutSections: Map<string, string>
private
options: TemplateCompilerOptions
private
pipes: Record<string, (...args: unknown[]) => unknown>
private
template: string
private
variables: Record<string, unknown>
rawContent: Map<string, string>

Methods

private
parseDataInterpolations(): Promise<void>
private
parseEachDirectives(): Promise<void>
private
removeComments(): void
private
renderNatively<TValue>(code: string, variables?: Record<string, unknown>): Promise<TValue>
private
restoreRawContent(): void
private
validateSyntax(): void
render(
template: string,
variables?: Record<string, unknown>,
): Promise<string>

Static Properties

directives: TemplateDirective[]
stacks: Map<string, string[]>