Skip to main content
Module

x/pug/mod.ts

Pug template engine for deno(for proper typing definition)
Latest
import * as pug from "https://deno.land/x/pug@v0.1.6/mod.ts";

Functions

Compile a Pug template to a function which can be rendered multiple times with different locals.

Compile a Pug template to a string of JavaScript that can be used client side along with the Pug runtime.

Compile a Pug template to an object of the form: { 'body': 'function (locals) {...}', 'dependencies': ['filename.pug'] } that can be used client side along with the Pug runtime. You should only use this method if you need dependencies to implement something like watching for changes to the Pug files.

Compile a Pug template from a file to a function which can be rendered multiple times with different locals.

Compile a Pug template file to a string of JavaScript that can be used client side along with the Pug runtime.

Compile a Pug template and render it without locals to html string.

Compile a Pug template from a file and render it without locals to html string.

Type Aliases

A function that can be use to render html string of compiled template.