pixsy/node_modules/pug-filters
synth-ruiner 495f1d958e initial 2017-12-22 17:22:08 +00:00
..
lib initial 2017-12-22 17:22:08 +00:00
test initial 2017-12-22 17:22:08 +00:00
CHANGELOG.md initial 2017-12-22 17:22:08 +00:00
LICENSE initial 2017-12-22 17:22:08 +00:00
README.md initial 2017-12-22 17:22:08 +00:00
index.js initial 2017-12-22 17:22:08 +00:00
package.json initial 2017-12-22 17:22:08 +00:00

README.md

pug-filters

Code for processing filters in pug templates

Build Status Dependency Status NPM version

Installation

npm install pug-filters

Usage

var filters = require('pug-filters');

filters.handleFilters(ast, filters)

Renders all Filter nodes in a Pug AST (ast), using user-specified filters (filters) or a JSTransformer.

filters.runFilter(name, str[, options[, currentDirectory]])

Invokes filter through jstransformer.

This is internally used in filters.handleFilters, and is a lower-level interface exclusively for invoking JSTransformer-based filters.

name represents the name of the JSTransformer.

str represents the string to render.

currentDirectory is used when attempting to require the transformer module.

options may contain the following properties:

  • minify (boolean): whether or not to attempt minifying the result from the transformer. If minification fails, the original result is returned.

License

MIT