1.0.2 • Published 9 years ago
gulp-any-standard v1.0.2
#gulp-any-standard
Standard linter for gulp, using dependency injection to allow use of any standard.
Usage
Install
$ npm install --save-dev gulp-any-standard
Examples
// include the required packages.
var gulp = require('gulp')
var gulpStandard = require('gulp-any-standard')
var standard = require('standard')
gulp.task('standard', function () {
return gulp.src(['./app.js'])
.pipe(gulpStandard(standard))
.pipe(gulpStandard.reporter('default', {
breakOnError: true
}))
})
Reporters
Built-in
You can choose a reporter when you call
stuff
.pipe(gulpStandard(standard))
.pipe(gulpStandard.reporter('default', opts))
External
You can also use some other custom made reporter
var reporter = require(<SOME_REPORTER>);
stuff
.pipe(gulpStandard(standard))
.pipe(gulpStandard.reporter(reporter, opts))
OR -
stuff
.pipe(gulpStandard(standard))
.pipe(gulpStandard.reporter(<REPORTER NAME>, opts))
Reporter options
breakOnError
Type: boolean
Default: false
Emit gulp error on reported error