Skip to content

Commit

Permalink
Update docs/readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
floatdrop committed Dec 2, 2014
1 parent 90c0a80 commit c94a11f
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ var watch = require('gulp-watch');
gulp.task('build', function () { console.log('Working!'); });

gulp.task('watch', function () {
watch('**/*.js', function (files, cb) {
gulp.start('build', cb);
watch('**/*.js', function () {
gulp.start('build');
});
});
```
Expand Down Expand Up @@ -75,20 +75,8 @@ gulp.task('default', function () {
One of the nice features, that can be achieved with `gulp-watch` - is incremental build.
When you want to build all files at start and then get only changed files - you can use these snippets:

In callback style:

```js
gulp.task('default', function() {
return gulp.src('js/*.js').pipe(watch('js/*.js', function(files) {
return files.pipe(gulp.dest('.'));
}));
});
```

Or in plain stream:

```js
gulp.task('default', function() {
gulp.task('default', function () {
return gulp.src('js/*.js')
.pipe(watch('js/*.js'))
.pipe(gulp.dest('.'));
Expand Down

2 comments on commit c94a11f

@leipert
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@floatdrop You should probably remove the paragraph about gulp-batch.
Does gulp-watch still just run the task once?

@floatdrop
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leipert yeah, this part is outdated. From 3.0.0 version gulp-watch is not includes gulp-batch inside.

Please sign in to comment.