Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to 3.x breaks old gulp file with useref.assets #153

Closed
rwillmer opened this issue Nov 27, 2015 · 4 comments
Closed

upgrade to 3.x breaks old gulp file with useref.assets #153

rwillmer opened this issue Nov 27, 2015 · 4 comments

Comments

@rwillmer
Copy link
Contributor

You get this error

TypeError: $.useref.assets is not a function

@rwillmer
Copy link
Contributor Author

I think it would be really useful for the v3 documentation to show the difference between v2 and v3 usage. I'll do a Pull Request if you agree.

The v2.x documentation gives this usage example:

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

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

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

The v3.x documentation gives this:

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

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

@rwillmer
Copy link
Contributor Author

Here's a link to the old API

https://github.com/jonkemp/gulp-useref/tree/v.2.1.0

@jonkemp
Copy link
Owner

jonkemp commented Nov 27, 2015

Sure, I think v3 is pretty well documented, but if you would like to add something showing the difference between the two, I'll look at it.

@nicholasglazer
Copy link

@rwillmer thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants