gulp.src globbing: re-include files that were excluded by globs?
See original GitHub issueIn 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:
- Created 9 years ago
- Comments:17 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This recent StackOverflow question looks similar: http://stackoverflow.com/questions/27622702/gulpjs-negate-file-then-re-add-it-later
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. 😉