Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PugViewEngine

Implementation of the ViewEngine class that renders Pug/Jade templates.

Hierarchy

Index

Constructors

constructor

Properties

Protected compileCache

compileCache: {} = {}

A cache of compiled templates.

Type declaration

  • [key: string]: (locals?: pug.LocalsObject) => string
      • (locals?: pug.LocalsObject): string
      • Parameters

        • Optional locals: pug.LocalsObject

        Returns string

Protected Readonly config

config: Config

Protected Readonly debug

debug: boolean

Protected Readonly globals

globals: {} = {}

Type declaration

Protected Readonly namespaces

namespaces: {} = {}

Type declaration

Protected Readonly request

Protected Readonly routing

routing: Routing

Accessors

Private appClassApplication

path

Methods

Protected app

Protected container

getBoundMethod

  • getBoundMethod(methodName: string): (...args: any[]) => any
  • Get the method with the given name from this class, bound to this class.

    Parameters

    • methodName: string

    Returns (...args: any[]) => any

    function

      • (...args: any[]): any
      • Parameters

        • Rest ...args: any[]

        Returns any

getFileExtension

  • getFileExtension(): string

Protected getGlobals

  • getGlobals(): {}

Protected getOptions

  • getOptions(templateName?: string): Options
  • Get the object of options passed to Pug's compile methods.

    Parameters

    • Optional templateName: string

    Returns Options

Protected make

  • make<T>(target: any, ...parameters: any[]): T

registerGlobalFactory

registerNamespace

renderByName

  • renderByName(templateName: string, locals: {}): string | Promise<string>

renderString

  • renderString(templateString: string, locals: {}): string | Promise<string>

resolveBasePath

resolveName

Extollo Logo

extollo (v. latin) - to lift up, to elevate

Extollo is a free & libre application framework in TypeScript.