Gathering detailed insights and metrics for gulp-nunjucks
Gathering detailed insights and metrics for gulp-nunjucks
Gathering detailed insights and metrics for gulp-nunjucks
Gathering detailed insights and metrics for gulp-nunjucks
gulp-nunjucks-render
Render Nunjucks templates with data
gulp-nunjucks-api
Render Nunjucks templates with data, custom filters, custom context functions and options for other Nunjucks API features.
gulp-nunjucks-html
Render Nunjucks templates to HTML
gulp-nunjucks-md
Render Markdown with Nunjucks templates and data
npm install gulp-nunjucks
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
150 Stars
71 Commits
19 Forks
5 Watchers
1 Branches
11 Contributors
Updated on Jun 01, 2025
Latest Version
6.0.0
Package Id
gulp-nunjucks@6.0.0
Unpacked Size
6.18 kB
Size
2.65 kB
File Count
4
NPM Version
9.2.0
Node Version
18.18.2
Published on
Nov 02, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Compile/precompile Nunjucks templates
Issues with the output should be reported on the Nunjucks issue tracker.
1npm install --save-dev gulp-nunjucks
1import gulp from 'gulp'; 2import {nunjucksCompile} from 'gulp-nunjucks'; 3 4export default () => ( 5 gulp.src('templates/greeting.html') 6 .pipe(nunjucksCompile({name: 'Sindre'})) 7 .pipe(gulp.dest('dist')) 8);
You can alternatively use gulp-data to inject the data:
1import gulp from 'gulp'; 2import {nunjucksCompile} from 'gulp-nunjucks'; 3import data from 'gulp-data'; 4 5export default () => ( 6 gulp.src('templates/greeting.html') 7 .pipe(data(() => ({name: 'Sindre'}))) 8 .pipe(nunjucksCompile()) 9 .pipe(gulp.dest('dist')) 10);
1import gulp from 'gulp'; 2import {nunjucksPrecompile} from 'gulp-nunjucks'; 3 4export default () => ( 5 gulp.src('templates/greeting.html') 6 .pipe(nunjucksPrecompile()) 7 .pipe(gulp.dest('dist')) 8);
Compile a template using the provided data
.
Type: object
The data object used to populate the text.
Type: object
Options will be passed directly to the Nunjucks Environment constructor which will be used to compile templates.
Type: nunjucks.Environment
Default: new nunjucks.Environment()
The custom Nunjucks Environment object which will be used to compile templates. If supplied, the rest of options
will be ignored.
Type: object
An object containing custom filters that will be passed to Nunjucks, with the filter's name as key and the filter function as value.
Async filters should be defined as async functions. You cannot use just a promise-returning function.
1{ 2 'shorten': string => string.slice(0, 5), 3 'round': number => Math.round(number), 4 'fetch': async url => { 5 const response = await fetch(url); 6 const result = await response.text(); 7 return result; 8 } 9}
Precompile a template for rendering dynamically at a later time.
Same options as nunjucks.precompile()
except for name
.
Type: object
Type: Function
Default: Relative template path
Example: templates/list.html
You can override the default behavior by supplying a function which gets the current File object and is expected to return the name.
Example:
1{ 2 name: file => `template-${file.relative}` 3}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 5/30 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More