Skip to content

Instantly share code, notes, and snippets.

@867
Last active July 12, 2018 05:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 867/5c3c0838e7abda4ecb76e7a9b3e2800e to your computer and use it in GitHub Desktop.
Save 867/5c3c0838e7abda4ecb76e7a9b3e2800e to your computer and use it in GitHub Desktop.
公式ブログ用:gulpfile.js : gulp-beautify
// set:beautify_option
const beautify_option = {
'indent_size': 2
}
// task:nunjucks
gulp.task('nunjucks', function(){
return gulp.src(paths.src.html + '**/*.njk')
.pipe(data(function(){
return require(paths.src.json);
}))
.pipe(nunjucks({
path: paths.src.template
}))
.pipe(beautify(beautify_option))
.pipe(gulp.dest(paths.dest.root))
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment