https://github.com/pgilad/gulp-colorguard
Keep a watchful eye on your css colors.
https://github.com/pgilad/gulp-colorguard
Last synced: about 1 year ago
JSON representation
Keep a watchful eye on your css colors.
- Host: GitHub
- URL: https://github.com/pgilad/gulp-colorguard
- Owner: pgilad
- License: mit
- Created: 2014-07-07T15:40:04.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2015-05-22T17:29:09.000Z (about 11 years ago)
- Last Synced: 2025-04-27T14:38:21.447Z (about 1 year ago)
- Language: JavaScript
- Size: 173 KB
- Stars: 37
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# [gulp](https://github.com/wearefractal/gulp)-colorguard
> Keep a watchful eye on your css colors.
[](https://npmjs.org/package/gulp-colorguard)
[](https://npmjs.org/package/gulp-colorguard)
[](https://travis-ci.org/pgilad/gulp-colorguard)
*Issues with the output should be reported on the css-colorguard [issue tracker](https://github.com/SlexAxton/css-colorguard/issues).*
## Install
Install with [npm](https://npmjs.org/package/gulp-colorguard)
```bash
$ npm install --save-dev gulp-colorguard
```
## Usage
```js
var gulp = require('gulp');
var colorguard = require('gulp-colorguard');
//example with basic css copying
gulp.task('css', function() {
gulp.src('./src/css/**/*.css')
.pipe(colorguard())
.pipe(gulp.dest('./public/css'));
});
//example with less-preprocesser
var less = require('gulp-less');
gulp.task('css', function() {
gulp.src('./src/less/**/*.less')
.pipe(less())
.pipe(colorguard())
.pipe(gulp.dest('./public/css'));
});
//example with verbose logging
gulp.task('css', function() {
gulp.src('./src/less/**/*.css')
.pipe(colorguard({
logOk: true
}))
.pipe(gulp.dest('./public/css'));
// then if no errors:
// --> main.css has no css color collisions
});
```
## API
[Options](https://github.com/SlexAxton/css-colorguard#programmatic) are passed through to css-colorguard,
except for `options.logOk` which affects this gulp plugin behavior only.
### logOk
Be verbose and log files that have no collisions. Off by default.
**Type**: `Boolean`
**Default**: `false`
## License
MIT @[Gilad Peleg](http://giladpeleg.com)