Skip to content

danielhusar/gulp-pleeease

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-pleeease Build Status

Gulp plugin for pleeease

See pleeease.io for documentation.

Install

npm install --save-dev gulp-pleeease

Example

var gulp     = require('gulp');
var pleeease = require('gulp-pleeease');

gulp.task('css', function () {
  gulp.src('./src/*.css')
  .pipe(pleeease())
  .pipe(rename({
    suffix: '.min',
    extname: '.css'
  }))
  .pipe(gulp.dest('./dest'));
});

You can also use out option (and it's preferable for good sourcemaps):

gulp.task('css', function () {
  gulp.src('./src/*.css')
  .pipe(pleeease({
    out: 'out.min.css'
  }))
  .pipe(gulp.dest('./dest'));
});

Preprocessors support

As simple as it looks, no need for specific gulp modules:

var gulp     = require('gulp');
var pleeease = require('gulp-pleeease');

gulp.task('css', function () {
  gulp.src('./src/*.scss')
  .pipe(pleeease({
    sass: true
  }))
  .pipe(gulp.dest('./dest'));
});

Or maybe, if you have imports:

var gulp     = require('gulp');
var pleeease = require('gulp-pleeease');

gulp.task('css', function () {
  gulp.src('./src/*.scss')
  .pipe(pleeease({
    sass: {
      includePaths: ['path/to/include']
    }
  }))
  .pipe(gulp.dest('./dest'));
});

You can use Sass, LESS or Stylus.

Source map support

Using gulp-sourcemaps. To get good sourcemaps, you should always specify base option in gulp.src. You will get inline sourcemaps.

var gulp       = require('gulp');
var pleeease   = require('gulp-pleeease');
var sourcemaps = require('gulp-sourcemaps');

gulp.task('css', function () {
  gulp.src('./src/*.css', {base: '.'})
    .pipe(sourcemaps.init())
      .pipe(pleeease())
    .pipe(sourcemaps.write())
    .pipe(gulp.dest('./dest'));
});

And even with preprocessors. Here, using Stylus, and with sourcemaps as a separate file:

var gulp       = require('gulp');
var pleeease   = require('gulp-pleeease');
var sourcemaps = require('gulp-sourcemaps');

gulp.task('css', function () {
  gulp.src('./src/*.styl', {base: '.'})
    .pipe(sourcemaps.init())
      .pipe(pleeease({
        stylus: {
          paths: ['path/to/include']
        }
      }))
    .pipe(sourcemaps.write('.'))
    .pipe(gulp.dest('./dest'));
});

Options

Same as pleeease

License

MIT © Daniel Husar

About

Gulp plugin for postprocess CSS with ease

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •