Skip to content

Commit 19c93e6

Browse files
committed
added html minification
1 parent 2a63bf5 commit 19c93e6

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

gulpfile.babel.js

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import path from 'path';
66
import sync from 'run-sequence';
77
import rename from 'gulp-rename';
88
import template from 'gulp-template';
9+
import htmlmin from 'gulp-htmlmin';
910
import fs from 'fs';
1011
import yargs from 'yargs';
1112
import lodash from 'lodash';
@@ -75,6 +76,7 @@ gulp.task('webpack', ['clean'], (cb) => {
7576
.pipe(gulp.dest(paths.dest));
7677

7778
gulp.src([paths.html], {base: root})
79+
.pipe(htmlmin({collapseWhitespace: true})) // minify html
7880
.pipe(gulp.dest(paths.dest));
7981

8082
gulp.src([paths.json])

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"file-loader": "^0.11.2",
3333
"fs-walk": "0.0.1",
3434
"gulp": "^3.9.1",
35+
"gulp-htmlmin": "^3.0.0",
3536
"gulp-rename": "^1.2.2",
3637
"gulp-template": "^4.0.0",
3738
"gulp-util": "^3.0.8",

0 commit comments

Comments
 (0)