0.2.2 • Published 7 years ago

gulp-crass v0.2.2

Weekly downloads
14
License
MIT
Repository
github
Last release
7 years ago

gulp-crass

Travis Build Status Circle Build Status Appveyor Build Status Build Status

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

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

10 years ago

0.0.1

10 years ago