0.1.2 • Published 6 years ago

sfn-pug-engine v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Sfn-Pug-Engine

Pug template engine for sfn framework.

For more information about pug, please visit https://pugjs.org/.

Install

npm i sfn-pug-engine

Example

import { HttpController, route } from "sfn";
import { PugEngine } from "sfn-pug-engine";

var engine = new PugEngine();

export default class extends HttpController {
    engine: PugEngine = engine;

    @route.get("/pug-test")
    index() {
        return this.view("pug-test.pug");
    }
}

API

new PugEngine(options?: PugOptions)

Interface PugOptions includes:

  • debug: boolean If true, the tokens and function body are logged to stdout.
  • compileDebug: boolean If true, the function source will be included in the compiled template for better error messages (default: true).
  • globals: string[] Add a list of global names to make accessible in templates.
0.1.2

6 years ago

0.1.1

6 years ago