@eklingen/vinyl-stream-nunjucks
v2.0.5
Published
Small vinyl-stream wrapper -aka Gulp plugin- for nunjucks.
Readme
Small vinyl-stream wrapper -aka Gulp plugin- for nunjucks
Run nunjucks within your streams.
TODO:
- Write a more detailed readme
- Include some common used template tag functions
NOTE: No tests have been written yet!
Installation
yarn install. Or npm install. Or just copy the files to your own project.
Usage
const nunjucksWrapper = require('@eklingen/vinyl-stream-nunjucks')
stream.pipe(nunjucksWrapper())Options
Both the nunjucks option and the envOptions will be passe to nunjucks. See the "nunjucks" documentation for more information.
nunjucks
nunjucksWrapper({
nunjucks: {
path: '.',
ext: '.html',
data: {},
manageEnv: null,
loaders: []
}
})envOptions
nunjucksWrapper({
envOptions: {
autoescape: false,
throwOnUndefined: true,
trimBlocks: false,
lstripBlocks: false,
watch: false,
noCache: false,
useCache: true,
async: false,
express: null,
tags: null
}
})Dependencies
This package requires "nunjucks" and "deepmerge".
Copyright (c) 2019 Elco Klingen. MIT License.
