0.1.0 • Published 6 years ago

sfn-sdopx-engine v0.1.0

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

Sfn-Sdopx-Engine

Sdopx template engine for sfn framework.

For more information about Sdopx, please visit www.sdopx.com.

Install

npm i sfn-sdopx-engine

Example

import { HttpController, route } from "sfn";
import { SdopxEngine } from "sfn-sdopx-engine";

var engine = new SdopxEngine();

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

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

API

new SdopxEngine(options?: SdopxOptions)

Interface NunjucksOptions includes:

  • left_delimiter: string default: {.
  • right_delimiter: string default: }.
  • force_compile: boolean The opposite to cache.
  • compile_check: boolean Watch the file and recompile when it's been modified.