1.0.4-alpha • Published 8 years ago

pug-require v1.0.4-alpha

Weekly downloads
4
License
(MIT OR Apache-2....
Repository
github
Last release
8 years ago

Pug Require

npm

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

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.15

7 years ago

1.0.14-alpha

7 years ago

1.0.13-alpha

7 years ago

1.0.12-alpha

7 years ago

1.0.11-alpha

7 years ago

1.0.10-alpha

7 years ago

1.0.9-alpha

7 years ago

1.0.8-alpha

7 years ago

1.0.7-alpha

7 years ago

1.0.6-alpha

8 years ago

1.0.5-alpha

8 years ago

1.0.4-alpha

8 years ago

1.0.3-alpha

8 years ago