1

Minify html

This commit is contained in:
Alex Yatskov 2014-10-01 19:47:54 +09:00
parent 46bfcf8d54
commit 9d1f3a3355
2 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,7 @@ var gulp = require('gulp');
var inject = require('gulp-inject'); var inject = require('gulp-inject');
var jshint = require('gulp-jshint'); var jshint = require('gulp-jshint');
var minifyCss = require('gulp-minify-css'); var minifyCss = require('gulp-minify-css');
var minifyHtml = require('gulp-minify-html');
var sourcemaps = require('gulp-sourcemaps'); var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify'); var uglify = require('gulp-uglify');
@ -59,6 +60,7 @@ gulp.task('html_release', function() {
var sources = gulp.src(['./dist/*.js', './dist/*.css'], { read: false }); var sources = gulp.src(['./dist/*.js', './dist/*.css'], { read: false });
return gulp.src(paths.html) return gulp.src(paths.html)
.pipe(inject(sources, { addRootSlash: false })) .pipe(inject(sources, { addRootSlash: false }))
.pipe(minifyHtml())
.pipe(gulp.dest('./')); .pipe(gulp.dest('./'));
}); });

View File

@ -11,8 +11,10 @@
"dependencies": { "dependencies": {
"gulp": "^3.8.8", "gulp": "^3.8.8",
"gulp-concat": "^2.4.1", "gulp-concat": "^2.4.1",
"gulp-inject": "^1.0.2",
"gulp-jshint": "^1.8.4", "gulp-jshint": "^1.8.4",
"gulp-minify-css": "^0.3.10", "gulp-minify-css": "^0.3.10",
"gulp-minify-html": "^0.1.5",
"gulp-rename": "^1.2.0", "gulp-rename": "^1.2.0",
"gulp-sourcemaps": "^1.2.2", "gulp-sourcemaps": "^1.2.2",
"gulp-uglify": "^1.0.1", "gulp-uglify": "^1.0.1",