0.1.3 • Published 8 years ago

del-gulpsass-blank-lines v0.1.3

Weekly downloads
2
License
MIT
Repository
-
Last release
8 years ago

del-gulpsass-blank-lines


使用gulp-sass-china生成的css文件会有空行。del-gulpsass-blank-lines可以删除生成的css文件的空行,该插件为强迫症患者准备。例如:

body { margin: 0; }

.cd { margin: 0; color: #fff; }

.cm .cx { padding: 20px; }

.cm .cd { text-decoration: none; }

使用插件后

body { margin: 0; }
.cd { margin: 0; color: #fff; }
.cm .cx { padding: 20px; }
.cm .cd { text-decoration: none; }

使用方法:

var gulp = require("gulp");                     // gulp
var sass = require("gulp-sass-china");          // sass
var dgbl = require("del-gulpsass-blank-lines"); // del-gulpsass-blank-lines
var dirname = __dirname;

gulp.task('sass', function (){
    gulp.src(dirname + '/sass/**/*.sass')
        // sass to css
        .pipe(sass({
            outputStyle: 'compact'
        })
            .on('error', sass.logError))
        .pipe(dgbl()) // 去掉css的多余的空行
        .pipe(gulp.dest(dirname + '/css'));
});

gulp.task('default', ['sass']);
0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago