jackfranklin / gulp-load-plugins

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

Turn pattern and replace string into an object #40

Closed F21 closed 10 years ago

F21 commented 10 years ago

I want to use gulp.spritesmith with other gulp-* plugins.

The name is unfortunate, so the default removal of gulp- will not work.

How about turning pattern and the replacement into an object?

var patterns = {};
patterns['gulp-*'] = 'gulp-';
patterns['gulp.*'] = 'gulp.';

And maybe a convenience version if our replacement string is the same as the pattern

var patterns = ['gulp-*', 'gulp.*'];
//gulp-load-plugins just keep the parts that matches the `*`.
jackfranklin commented 10 years ago

Once #38 is merged this should deal with that.

jackfranklin commented 10 years ago

0.7.0 has been published which supports loading gulp.*