0.1.1 • Published 6 years ago

sfn-whatstpl-engine v0.1.1

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

Sfn-WhatsTPL-Engine

WhatsTPL template engine for sfn framework.

For more information about WhatsTPL, please visit github.com/hyurl/whatstpl.

Install

npm i sfn-whatstpl-engine

Example

import { HttpController, route } from "sfn";
import { WhatstplEngine } from "sfn-whatstpl-engine";

var engine = new WhatstplEngine();

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

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

API

new WhatstplEngine(options?: WhatstplOptions)

Interface WhatstplOptions includes:

  • removeComments?: boolean Whether or not to remove the comments when ernder HTML.
  • timeout: number Used when the program is run in a browser and load remote template via Ajax.
0.1.1

6 years ago

0.1.0

6 years ago