node package manager

combine-css

combine-css v0.0.2 Build Status

Information

Packagecombine-css
Description Combines CSS files into as few files as possible, taking size and selector limits into account
Node Version >= 0.8

Example usage with Gulp

var gulp = require('gulp');
var combineCSS = require('combine-css');
 
gulp.task('combine', function() {
    gulp.src('./css/*.css')
        .pipe(combineCSS({
            lengthLimit: 256,//2KB 
            prefix: '_m-',
            selectorLimit: 4080
        }))
        .pipe(gulp.dest('./combinedCSS'));
});
 
gulp.task('default', ['combine']);
 
// Rerun the task when a file changes 
gulp.task('watch', function () {
  gulp.watch('./css/*.css', ['combine']);
});