gulp-html2pug

Gulp plugin to convert html files to pug

Usage no npm install needed!

<script type="module">
  import gulpHtml2pug from 'https://cdn.skypack.dev/gulp-html2pug';
</script>

README

gulp-html2pug

Travis npm package Coverage Status Dependency Status devDependency Status

Convert html files to pug

Install

$ npm install --save-dev gulp-html2pug

Usage

Convert index.html to pug/index.pug:

const gulp = require('gulp');
const html2pug = require('gulp-html2pug');

gulp.task('pug', function() {
  // Backend locales
  return gulp.src('index.html')
  .pipe(html2pug(/* options for html2pug such as { fragment: true } */))
  .pipe(gulp.dest('pug'));
});

License

See the LICENSE file for license rights and limitations (MIT).