Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Import modules
- const gulp = require('gulp');
- const htmlmin = require('gulp-htmlmin');
- // Gulp task to minify HTML files
- gulp.task('html', () => {
- gulp.src(['./**/*.html', '!./node_modules/**'])
- .pipe(htmlmin({
- collapseWhitespace: true,
- minifyCSS: true,
- minifyJS: true,
- removeComments: true
- }))
- .pipe(gulp.dest('./dist'));
- });
Add Comment
Please, Sign In to add comment