Created
October 20, 2015 14:33
-
-
Save jitendravyas/31a22db17f9868506126 to your computer and use it in GitHub Desktop.
Nunjucks task with gulp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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