Skip to content

Commit 11c919f

Browse files
committed
Fix incorrect examples, should use gulp.src
1 parent 1a2ccb9 commit 11c919f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ For a list of all reporters supported by `csslint`, see the [csslint wiki](https
7474

7575
```js
7676
gulp.task('lint', function() {
77-
gulp.files('lib/*.css')
77+
gulp.src('lib/*.css')
7878
.pipe(csslint())
7979
.pipe(csslint.reporter('junit-xml'));
8080
```
@@ -96,7 +96,7 @@ var customReporter = function(file) {
9696
};
9797

9898
gulp.task('lint', function() {
99-
gulp.files('lib/*.css')
99+
gulp.src('lib/*.css')
100100
.pipe(csslint())
101101
.pipe(csslint.reporter(customReporter));
102102
});
@@ -107,7 +107,7 @@ You can also pass options to the built-in formatter, by passing a second option
107107
108108
```js
109109
gulp.task('lint', function() {
110-
gulp.files('lib/*.css')
110+
gulp.src('lib/*.css')
111111
.pipe(csslint())
112112
.pipe(csslint.reporter('junit-xml', options));
113113
});
@@ -120,15 +120,15 @@ Default is using `process.stdout.write`, but you can use e.g. `console.log`, or
120120
121121
```js
122122
gulp.task('lint', function() {
123-
gulp.files('lib/*.css')
123+
gulp.src('lib/*.css')
124124
.pipe(csslint())
125125
.pipe(csslint.reporter('junit-xml', {logger: console.log.bind(console)}));
126126
});
127127
```
128128
129129
```js
130130
gulp.task('lint', function() {
131-
gulp.files('lib/*.css')
131+
gulp.src('lib/*.css')
132132
.pipe(csslint())
133133
.pipe(csslint.reporter('junit-xml', {logger: gutil.log.bind(null, 'gulp-csslint:')}));
134134
});
@@ -142,7 +142,7 @@ gulp.task('lint', function(cb) {
142142
var fs = require('fs');
143143
var output = '';
144144

145-
gulp.files('lib/*.css')
145+
gulp.src('lib/*.css')
146146
.pipe(csslint())
147147
.pipe(csslint.reporter('junit-xml', {logger: function(str) { output += str; }}));
148148

@@ -160,11 +160,11 @@ Use the `csslint.addRule(rule)` method to define custom rules that run in additi
160160
var csslint = require('gulp-csslint');
161161

162162
csslint.addRule({
163-
// rule information
163+
// rule information
164164
});
165165

166166
gulp.task('lint', function() {
167-
gulp.files('lib/*.css')
167+
gulp.src('lib/*.css')
168168
.pipe(csslint())
169169
.pipe(csslint.reporter())
170170
});
@@ -178,7 +178,7 @@ Pipe the file stream to `csslint.failReporter()` to fail on errors.
178178
var csslint = require('gulp-csslint');
179179

180180
gulp.task('lint', function() {
181-
gulp.files('lib/*.css')
181+
gulp.src('lib/*.css')
182182
.pipe(csslint())
183183
.pipe(csslint.reporter()) // Display errors
184184
.pipe(csslint.reporter('fail')); // Fail on error (or csslint.failReporter())

0 commit comments

Comments
 (0)