Skip to content

Commit

Permalink
Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonkemp committed Jan 24, 2016
1 parent cdb34ad commit 04cf186
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,31 +236,35 @@ or
TypeError: useref.assets is not a function

For a simple configuration, you can replace this V2 code:

```js
var gulp = require('gulp'),
useref = require('gulp-useref');
var gulp = require('gulp'),
useref = require('gulp-useref');

gulp.task('default', function () {
var assets = useref.assets();
gulp.task('default', function () {
var assets = useref.assets();

return gulp.src('app/*.html')
return gulp.src('app/*.html')
.pipe(assets)
.pipe(assets.restore())
.pipe(useref())
.pipe(gulp.dest('dist'));
});
});
```

with this V3 code:

```js
var gulp = require('gulp'),
useref = require('gulp-useref');
var gulp = require('gulp'),
useref = require('gulp-useref');

gulp.task('default', function () {
return gulp.src('app/*.html')
gulp.task('default', function () {
return gulp.src('app/*.html')
.pipe(useref())
.pipe(gulp.dest('dist'));
});
});
```

If you were previously using useref in a multi-stage pipe,
you may need to rewrite the pipe, since the simplified V3 API
may not allow for its previous usage.
Expand Down

0 comments on commit 04cf186

Please sign in to comment.