dshemendiuk / gulp-npm-dist

Copy minified (dist) files of modules listed in package.json "dependencies" field to your build path
26 stars 3 forks source link

Glob exclusion order is wrong #7

Closed dariahervieux closed 6 years ago

dariahervieux commented 6 years ago

Hi :) First of all, thank you for your cool plugin! I appreciate using it.

I'm using it with gulp 4.0.0.

Seems like in the this version gulp.src() globs order is interpreted differently. From gulp.src() docs:

A glob that begins with ! excludes matching files from the glob results up to that point.

So according to that, you should first include patterns and then exclude.

Currently it's the opposite:

    // Excludes
    excludes.map(function (value) {
      packages.push('!' + mainFileDir + '/**/' + value);
    });
    // Includes
    packages.push(mainFileDir + '/**/*');

Would you please consider fixing it?

dshemendiuk commented 6 years ago

Thanks, @dariahervieux Fixed