2.0.5 • Published 2 years ago

@eklingen/vinyl-stream-nunjucks v2.0.5

Weekly downloads
37
License
MIT
Repository
github
Last release
2 years ago

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.

2.0.5

2 years ago

2.0.4

2 years ago

2.0.3

3 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago