gulp.task(function templates(cb) {
const data = require('./templates/data/data.json');
gulp.src('/pages/**/*.pug')
.pipe(plumber())
.pipe(pug({
locals: data
}).on('error', function(error) {
console.log(error);
}))
.pipe(gulp.dest('dist/'))
cb();
});