TypeDoc all the thngs
This commit is contained in:
@@ -2,8 +2,12 @@ import {ViewEngine} from "./ViewEngine"
|
||||
import {Injectable} from "@extollo/di"
|
||||
import * as pug from "pug"
|
||||
|
||||
/**
|
||||
* Implementation of the ViewEngine class that renders Pug/Jade templates.
|
||||
*/
|
||||
@Injectable()
|
||||
export class PugViewEngine extends ViewEngine {
|
||||
/** A cache of compiled templates. */
|
||||
protected compileCache: {[key: string]: ((locals?: pug.LocalsObject) => string)} = {}
|
||||
|
||||
public renderString(templateString: string, locals: { [p: string]: any }): string | Promise<string> {
|
||||
@@ -22,6 +26,10 @@ export class PugViewEngine extends ViewEngine {
|
||||
return compiled(locals)
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the object of options passed to Pug's compile methods.
|
||||
* @protected
|
||||
*/
|
||||
protected getOptions() {
|
||||
return {
|
||||
basedir: this.path.toLocal,
|
||||
|
||||
Reference in New Issue
Block a user