Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/koistya/gulp-csscomb
CSScomb plugin for Gulp.js. Formats CSS according to a pre-defined coding style.
https://github.com/koistya/gulp-csscomb
Last synced: 13 days ago
JSON representation
CSScomb plugin for Gulp.js. Formats CSS according to a pre-defined coding style.
- Host: GitHub
- URL: https://github.com/koistya/gulp-csscomb
- Owner: koistya
- License: mit
- Created: 2014-01-30T21:37:39.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T14:47:54.000Z (almost 2 years ago)
- Last Synced: 2024-10-30T08:37:07.089Z (13 days ago)
- Language: JavaScript
- Homepage: http://csscomb.com
- Size: 94.7 KB
- Stars: 122
- Watchers: 8
- Forks: 23
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# [gulp](http://gulpjs.com)-csscomb [![Build Status](http://img.shields.io/travis/koistya/gulp-csscomb/master.svg?style=flat)](http://travis-ci.org/koistya/gulp-csscomb) [![Dependency Status](https://david-dm.org/koistya/gulp-csscomb.svg?style=flat)](https://david-dm.org/koistya/gulp-csscomb) [![Tips](http://img.shields.io/gratipay/koistya.svg?style=flat)](https://gratipay.com/koistya)
[](http://csscomb.com)
> Format CSS coding style with [CSScomb](http://csscomb.com).
*If you have any difficulties with the output of this plugin, please use the
[CSScomb tracker](https://github.com/csscomb/csscomb.js/issues).*---
🔥 Want to strengthen your core JavaScript skills and master ES6?
I would personally recommend this awesome ES6 course by Wes Bos.---
## Installation
```sh
npm install gulp-csscomb --save-dev
```## Example 1
```js
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'));
});
```## Example 2
```js
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')`
## License
The MIT License (MIT) © Konstantin Tarkus ([@koistya](https://twitter.com/koistya))