2.0.2 • Published 5 years ago
pug-require v2.0.2
Pug Require
Allows compiling and loading Pug templates via require('./path/to/template.pug')
.
Installation
$ npm install pug-require
Usage
// Install hooks
const configurePug = require('pug-require');
configurePug({ /* pug options */ });
// Compile template
const pugTemplateFunction = require('./path/to/template.pug');
// Use template
const html = pugTemplateFunction({ /* local variables */ });
API
configurePug(pugOptions)
pugOptions : A Pug options bundle
Regardless of options, attaches the trusted types plugin.
uninstall()
Detaches the Pug hook.
A no-op if not currently installed.
reinstall()
Undoes a call to uninstall
.
A no-op if already installed.
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.15
5 years ago
1.0.14-alpha
5 years ago
1.0.13-alpha
6 years ago
1.0.12-alpha
6 years ago
1.0.11-alpha
6 years ago
1.0.10-alpha
6 years ago
1.0.9-alpha
6 years ago
1.0.8-alpha
6 years ago
1.0.7-alpha
6 years ago
1.0.6-alpha
6 years ago
1.0.5-alpha
6 years ago
1.0.4-alpha
6 years ago
1.0.3-alpha
6 years ago