gulp-crass
v0.2.2
Published
Css optimize
Downloads
24
Readme
gulp-crass
Css files by optimizing utility organizes and removes spaces
Uses the crass library.
How It Works
/path/to/file.css
:
b, c, a {
third: rgba(255, 255, 255, 0.9);
second: abc;
first: 50%;
}
Output:
a, b, c {
first: 50%;
second: abc;
third: hsla(0, 0%, 100%, 0.9);
}
Install
Install with npm
npm install --save-dev gulp-crass
Usage
gulp.task('default', function() {
return gulp.src('./exam/*.css')
.pipe(crass())
.pipe(gulp.dest('build/'));;
});
With options:
gulp.task('default', function() {
return gulp.src('./exam/*.css')
.pipe(crass({pretty:false}))
.pipe(gulp.dest('build/'));;
});
API
crass(options)
options.pretty
Type: Boolean
Default: true
options.sourceMap && options.sourcemap
Type: Boolean
Default: false