Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 824 Bytes

.verb.md

File metadata and controls

27 lines (17 loc) · 824 Bytes

What does this do?

Default engine

Adds a default [template engine][engine-base] for rendering templates. This engine is registered with the name *.

In a vinyl stream, to force rendering to use this engine, do:

app.src('*.md')
  .pipe(app.renderFile('*')) //<= engine name

Common middleware

Registers the [common-middleware][] plugin, which runs preRender, posRender and preWrite middleware that handle escaping and unescaping of templates/delimiters that should not be evaluated at render time (e.g. when writing documentation it's common to have examples of templates that should not be rendered).

Usage

This plugin can be used in a verbfile.js or a globally installed verb generator.

var defaults = require('{%= name %}');

// register the plugin
app.use(defaults());