jackfranklin / gulp-load-plugins

Automatically load in gulp plugins
https://github.com/jackfranklin/gulp-load-plugins
MIT License
757 stars 55 forks source link

Running into issue with gulp-rename. #51

Closed crswll closed 9 years ago

crswll commented 9 years ago

I can do this just fine

var rename = require('gulp-rename');
gulp.src('foo.css').pipe(rename({ suffix: '.min' })).pipe('./dest');

but

var $ = require('gulp-load-plugins')();
gulp.src('foo.css').pipe($.rename({ suffix: '.min' })).pipe('./dest');

fails with the error

[gulp] 'styles' errored after 448 ms Object #<Object> has no method 'rename'

Possibly an issue with the rename functionality recently added? https://github.com/jackfranklin/gulp-load-plugins#renaming

jackfranklin commented 9 years ago

It could well be something related to that, interesting. I will have a look at this asap.

crswll commented 9 years ago

gulp-load-plugins is working well with every other gulp-* module I have. I tried { lazy: false } as the docs mentioned but still no luck. I should have mentioned that in the opening note. Sorry about that!

jackfranklin commented 9 years ago

Could you try running a version before the rename functionality was added and see if that works? (Install 0.7.1)

crswll commented 9 years ago

That didn't work, so I did a bit more research and realized it was my fault. I didn't have gulp-rename in my package.json for whatever reason. Sorry to bother you and thanks!