Sök…


Installation och användning

Installation

$ npm install gulp-jslint --save-dev

Användande

Lägg till i gulpfile.js:

var gulp = require('gulp');
var jslint = require('gulp-jslint');

gulp.task('lint', function(){
    return gulp.src(['source.js'])
        .pipe(jslint({ /* this object represents the JSLint directives being passed down */ }))
        .pipe(jslint.reporter( 'my-reporter' ));
});

för att använda den här uppgiften:

$ ./node_modules/gulp/bin/gulp.js lint


Modified text is an extract of the original Stack Overflow Documentation
Licensierat under CC BY-SA 3.0
Inte anslutet till Stack Overflow