Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adam-lynch/gulp-coffeelint-threshold
A GulpJS plugin to catch the output from gulp-coffeelint and call a callback if the error or warning count is above a threshold you set
https://github.com/adam-lynch/gulp-coffeelint-threshold
Last synced: 13 days ago
JSON representation
A GulpJS plugin to catch the output from gulp-coffeelint and call a callback if the error or warning count is above a threshold you set
- Host: GitHub
- URL: https://github.com/adam-lynch/gulp-coffeelint-threshold
- Owner: adam-lynch
- Created: 2014-03-05T15:26:18.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-17T20:56:50.000Z (about 10 years ago)
- Last Synced: 2024-12-27T17:11:45.720Z (24 days ago)
- Language: JavaScript
- Homepage: http://www.adamlynch.com
- Size: 230 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
gulp-coffeelint-threshold
==========[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Windows Build Status][appveyor-image]][appveyor-url] [![Dependency Status][depstat-image]][depstat-url]
---
A [GulpJS](http://github.com/gulpjs/gulp) plugin to catch the output from [gulp-coffeelint](https://github.com/janraasch/gulp-coffeelint) and call a callback if the error or warning count is above a threshold you set.
# Information
Packagegulp-coffeelint-threshold
Description
A GulpJS plugin to catch the output from gulp-coffeelint and call a callback if the error or warning count is above a threshold you set.Node Version
>= 0.9# Installation
```js
npm install gulp-coffeelint-threshold
```# Usage
```js
var gulp = require('gulp');
var gutil = require('gulp-util');
var coffeelint = require('gulp-coffeelint');
var coffeelintThreshold = require('gulp-coffeelint-threshold');gulp.task('lint', function() {
gulp.src('./*.coffee')
.pipe(coffeelint())
.pipe(coffeelintThreshold(10, 0, function(numberOfWarnings, numberOfErrors){
gutil.beep();
throw new Error('CoffeeLint failure; see above. Warning count: ' + numberOfWarnings
+ '. Error count: ' + numberOfErrors + '.');
}));
});gulp.task('default', ['lint']);
```## Arguments
`coffeelintThreshold(maxWarnings, maxErrors, callbackOnFailure)`
- `maxWarnings`, a number. Set to `-1` if you don't want any warning threshold.
- `errorWarnings`, a number. Set to `-1` if you don't want any warning threshold.
- `callbackOnFailure(numberOfWarnings, numberOfWarnings)`, a function that gets called when the number of warnings or errors are over their respective thresholds you have set. It gets passed the number of warnings and errors as arguments.[npm-url]: https://npmjs.org/package/gulp-coffeelint-threshold
[npm-image]: http://img.shields.io/npm/v/gulp-coffeelint-threshold.svg?style=flat[travis-url]: http://travis-ci.org/adam-lynch/gulp-coffeelint-threshold
[travis-image]: http://img.shields.io/travis/adam-lynch/gulp-coffeelint-threshold.svg?style=flat[appveyor-url]: https://ci.appveyor.com/project/adam-lynch/gulp-coffeelint-threshold/branch/master
[appveyor-image]: https://ci.appveyor.com/api/projects/status/tradq3vg1hoah36j/branch/master?svg=true[depstat-url]: https://david-dm.org/adam-lynch/gulp-coffeelint-threshold
[depstat-image]: https://david-dm.org/adam-lynch/gulp-coffeelint-threshold.svg?style=flat