Pug Require
Allows compiling and loading Pug templates via require('./path/to/template.pug')
.
Installation
$ npm install pug-require
Usage
// Install hooksconst configurePug = ; ; // Compile templateconst pugTemplateFunction = ; // Use templateconst html = ;
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.