gulp-sqwish
v1.0.0
Published
Minify css with sqwish.
Downloads
53
Maintainers
Readme
#gulp-sqwish
##Welcome css compress plugin, based on sqwish.
##Basic Usage
var gulp = require("gulp")
var sqwish = require('gulp-sqwish');
gulp.task('css', function () {
return gulp.src('./css/**/*.css')
.pipe(sqwish())
.pipe(gulp.dest('./css'));
});
/* before */
main {
width: 500px;
height: 500px;
}
main {
color: red;
}
/* after */
main{width:500px;height:500px}main{color:red}
###Strict Optimizations
You can also use the strict mode.
use {strict:true}
, like this.
var gulp = require("gulp")
var sqwish = require('gulp-sqwish');
gulp.task('css', function () {
return gulp.src('./css/**/*.css')
.pipe(sqwish({strict:true}))
.pipe(gulp.dest('./css'));
});
/* before */
main {
width: 500px;
height: 500px;
}
main {
color: red;
}
/* after */
main{color:red;width:500px;height:500px}
##欢迎使用 基于sqwish编写的gulp-sqwish