gulp-csscomb
![Tips](https://camo.githubusercontent.com/e45bf516b61490e9d5fe4f3b7b19d2a62536020c26cb9172c809f12324757f6a/687474703a2f2f696d672e736869656c64732e696f2f67726174697061792f6b6f69737479612e7376673f7374796c653d666c6174)
Format CSS coding style with CSScomb.
If you have any difficulties with the output of this plugin, please use the CSScomb tracker.
🔥 Want to strengthen your core JavaScript skills and master ES6?
I would personally recommend this awesome ES6 course by Wes Bos.
npm install gulp-csscomb --save-dev
var gulp = require('gulp');
var csscomb = require('gulp-csscomb');
gulp.task('styles', function() {
return gulp.src('src/styles/main.css')
.pipe(csscomb())
.pipe(gulp.dest('./build/css'));
});
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
gulp.task('styles', function() {
return gulp.src('src/styles/bootstrap.less')
.pipe($.less({strictMath: true}))
.pipe($.autoprefixer([
'Android 2.3',
'Android >= 4',
'Chrome >= 20',
'Firefox >= 24', // Firefox 24 is the latest ESR
'Explorer >= 8',
'iOS >= 6',
'Opera >= 12',
'Safari >= 6']))
.pipe($.csscomb())
.pipe(gulp.dest('./build/css'));
});
If there is .csscomb.json
file present in the same folder as the source file(s),
or in the project root folder, gulp-csscomb
will read config settings from it
instead of default config.
You can also specify a pre-defined configuration. Ex.: csscomb('zen')
The MIT License (MIT) © Konstantin Tarkus (@koistya)