Skip to content

Instantly share code, notes, and snippets.

@jitendravyas
Created October 20, 2015 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jitendravyas/31a22db17f9868506126 to your computer and use it in GitHub Desktop.
Save jitendravyas/31a22db17f9868506126 to your computer and use it in GitHub Desktop.
Nunjucks task with gulp
gulp.task('nunjucks', function() {
return gulp.src('./source/html/pages/*.html')
.pipe(data(function() {
return JSON.parse(fs.readFileSync('./source/data/data.json'));
}))
.pipe(nunjucks(nunjucksOpts))
.pipe(gulp.dest('build'))
.pipe(browserSync.stream());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment