Loads JSON data from companion files and stores it in file.data
via
gulp-data.
npm install gulp-data-json --save-dev
var gulp = require("gulp");
var hb = require("gulp-hb");
var dataJson = require("gulp-data-json");
gulp.task("handlebars", function() {
return gulp.src("src/**/*.hbs")
.pipe(dataJson())
.pipe(hb())
.pipe(gulp.dest("dest"));
});
MIT