0
如何在Nunjucks中使用多個數據文件? - 一串字符串不適合我;多個數據文件與Nunjucks
gulp.task('nunjucks', function() {
return gulp.src('src/pages/**/*.+(html|nunjucks)')
.pipe(data(function() {
/*DOESN'T WORK*/ return require(['./src/js/variables/media-queries.json', './src/data/data.json'])
}))
.pipe(nunjucksRender({
path: ['src/templates']
}))
.pipe(gulp.dest('dist'))
.pipe(connect.reload());
});