yurii-sorokin / load-gulp-tasks

Load gulp tasks using glob matching
3 stars 1 forks source link

plugins not prefixed with gulp- aren't loading #2

Open Karnith opened 8 years ago

Karnith commented 8 years ago

would it be possible to refactor the code a bit to merge plugins from override with the default plugin loading system instead of being forced to use default loading behavior or overrides? I ask this as there a loads of plugins out there that don't have a gulp prefix to them. By merging the overrides with the default loading behavior, you could encompass those plugins. as it stands now, if I use the del gulp plugin, I need to add it to the overrides along with every other plugin being used that would normally be picked up by gulp-load-plugins and your load-gulp-tasks plugin.

Thx

yurii-sorokin commented 8 years ago

Hi @Karnith,

You could easily redefine plugins by yourself. See example below.

var gulp = require('gulp');
var loadPlugins = require('gulp-load-plugins');

var customPlugins = loadPlugins(/* your custom options for gulp-load-plugins module */);

// Extend plugins
customPlugins.del = require('del');

var options = {
   plugins: customPlugins
}

require('load-gulp-tasks')(gulp, options);