question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gulp.src globbing: re-include files that were excluded by globs?

See original GitHub issue

In gulp.src, is it at all possible to re-include files that were excluded by a previous glob? This is what I mean:

gulp.task('default', function() {
    rimraf.sync('dist');
    return gulp.src(['src/**', '!src/**/*.js', 'src/vendor/**/*.js'], { base: 'src' })
        .pipe(gulp.dest('dist'));
});

This results in an empty dist/vendor directory.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
heikkicommented, Dec 25, 2014
1reaction
UltCombocommented, Dec 28, 2014

Alright, I’ve added a note to the top of gulp-src-ordered-globs’s readme about gulp 4, and I’ll mark the npm package as deprecated when gulp 4 stable is released.

I didn’t intend to appear impatient, but I really needed this functionality to make a decent gulp workflow for me and the rest of @es6rocks to work on our projects – that’s why I had to create another package. 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js glob include/exclude files - Stack Overflow
My idea is this: Select all files and folders in src; Remove all js and sass files because they get compiled/concat/minified and copied...
Read more >
Exclude Directory-Pattern in gulp with glob in `gulp.src`
Exclude Directory-Pattern in gulp with glob in `gulp.src`. ay you have a folder project/src that contains the following files: file.txt folder
Read more >
Explaining Globs | gulp.js
Globbing is the act of locating files on a filesystem using one or more globs. The src() method expects a single glob string...
Read more >
Ignoring Code - ESLint - Pluggable JavaScript Linter
Glob patterns in ignorePatterns are relative to the directory that the config file is placed in. You cannot write ignorePatterns property under overrides ......
Read more >
glob-all - npm.io
Check Glob-all 3.3.0 package - Last release 3.3.0 with MIT licence at our ... //then, exclude files/x/ 'files/x/z.txt' //then, reinclude files/x/z.txt ]) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found