Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
koistya committed Jul 2, 2014
1 parent 030d7bb commit 3331d11
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# gulp-csscomb

> Format CSS with [CSScomb](https://npmjs.org/package/csscomb).
> Format CSS coding style with [CSScomb](https://npmjs.org/package/csscomb).
*If you have any difficulties with the output of this plugin, please use the
[CSScomb tracker](https://github.com/csscomb/csscomb.js/issues).*
Expand All @@ -13,22 +13,47 @@ Install via [npm](https://npmjs.org/package/gulp-csscomb):
npm install gulp-csscomb --save-dev
```

## Example
## Example 1

```javascript
var gulp = require('gulp');
var csscomb = require('gulp-csscomb');

gulp.task('default', function () {
return gulp.src('./src/styles/main.css')
gulp.task('styles', function () {
return gulp.src('src/styles/main.css')
.pipe(csscomb())
.pipe(gulp.dest('./build/css'));
});
```

If there is `.csscomb.json` file present in the same folder with the source .css file,
`csscomb` will read configuration data from it.
## Example 2

```javascript
var gulp = require('gulp');
var less = require('gulp-less');
var prefixer = require('gulp-autoprefixer');
var csscomb = require('gulp-csscomb');

gulp.task('styles', function () {
return gulp.src('src/styles/bootstrap.less')
.pipe(less({strictMath: true}))
.pipe(prefixer([
'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),
`csscomb` will read config settings from it instead using default config.

## License

The MIT License (MIT) © 2014 Konstantin Tarkus ([@koistya](https://twitter.com/koistya))
The MIT License (MIT) © Konstantin Tarkus ([@koistya](https://twitter.com/koistya))

0 comments on commit 3331d11

Please sign in to comment.