Skip to content

Instantly share code, notes, and snippets.

@chrispauley
Last active August 9, 2017 12:31
Show Gist options
  • Save chrispauley/82b6f2dbacfe12fd5477227dfc08ce0f to your computer and use it in GitHub Desktop.
Save chrispauley/82b6f2dbacfe12fd5477227dfc08ce0f to your computer and use it in GitHub Desktop.
Gulp-merge-json task
// https://tusharghate.com/rendering-pug-templates-with-multiple-data-files
// Causes a deep merge into one combined json file.
gulp.task('pug:combined', function() {
return gulp.src('src/data/**/*.json')
.pipe(merge({
fileName: 'combined.json'
}))
.pipe(gulp.dest('temp'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment