use cleancss for minification
This commit is contained in:
parent
53e51af9c7
commit
312136a57c
|
@ -5,7 +5,7 @@ var postcss = require('gulp-postcss');
|
||||||
var sourcemaps = require('gulp-sourcemaps');
|
var sourcemaps = require('gulp-sourcemaps');
|
||||||
var autoprefixer = require('autoprefixer-core');
|
var autoprefixer = require('autoprefixer-core');
|
||||||
var livereload = require('gulp-livereload');
|
var livereload = require('gulp-livereload');
|
||||||
|
var cleancss = require('gulp-clean-css');
|
||||||
var print = require('gulp-print');
|
var print = require('gulp-print');
|
||||||
var paths = require('./paths');
|
var paths = require('./paths');
|
||||||
var errorHandler = require('./errorHandler');
|
var errorHandler = require('./errorHandler');
|
||||||
|
@ -33,12 +33,13 @@ gulp.task('less', function() {
|
||||||
.pipe(sourcemaps.init())
|
.pipe(sourcemaps.init())
|
||||||
.pipe(less({
|
.pipe(less({
|
||||||
dumpLineNumbers : 'false',
|
dumpLineNumbers : 'false',
|
||||||
compress : true,
|
compress : false,
|
||||||
yuicompress : true,
|
yuicompress : false,
|
||||||
ieCompat : true,
|
ieCompat : true,
|
||||||
strictImports : true
|
strictImports : true
|
||||||
}))
|
}))
|
||||||
.pipe(postcss([ autoprefixer({ browsers: ['last 2 versions'] }) ]))
|
.pipe(postcss([ autoprefixer({ browsers: ['last 2 versions'] }) ]))
|
||||||
|
.pipe(cleancss())
|
||||||
.on('error', errorHandler.onError)
|
.on('error', errorHandler.onError)
|
||||||
.pipe(sourcemaps.write(paths.dest.content))
|
.pipe(sourcemaps.write(paths.dest.content))
|
||||||
.pipe(gulp.dest(paths.dest.content))
|
.pipe(gulp.dest(paths.dest.content))
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
"del": "1.2.0",
|
"del": "1.2.0",
|
||||||
"gulp": "3.9.0",
|
"gulp": "3.9.0",
|
||||||
"gulp-cached": "1.1.0",
|
"gulp-cached": "1.1.0",
|
||||||
|
"gulp-clean-css": "^3.0.4",
|
||||||
"gulp-concat": "2.6.0",
|
"gulp-concat": "2.6.0",
|
||||||
"gulp-declare": "0.3.0",
|
"gulp-declare": "0.3.0",
|
||||||
"gulp-handlebars": "3.0.1",
|
"gulp-handlebars": "3.0.1",
|
||||||
|
|
Loading…
Reference in New Issue