Questions tagged [gulp-glob]

file name globbing in gulp.src and gulp.watch methods

file name globbing in gulp follows node-glob syntax

https://gulpjs.org/API.html#gulp-src-globs-options

8 questions
9
votes
2 answers

Gulp copying empty directories

In my gulp build I've made a task that runs after all compiling, uglifying and minification has occurred. This task simply copies everything from the src into the dest directory that hasn't been touched/processed by earlier tasks. The little issue…
null
  • 7,906
  • 3
  • 36
  • 37
2
votes
1 answer

Gulp globbing excluding files then unexcluding not working as described

If I have the files client/ a.js bob.js bad.js And the gulp task gulp.task('copy', function() { return gulp.src(['client/*.js', '!client/b*.js', 'client/bad.js']) .pipe(gulp.dest('public')); }); then according to the…
Sam Fen
  • 5,074
  • 5
  • 30
  • 56
1
vote
0 answers

Gulp task: how to write a JSON file that contains a list of files

I have a folder that contains audio files. Starting to this folder I need to write a manifest file. This is the format of the manifests: { "audio": [ "assets/sounds/file1.mp3", "assets/sounds/file2.mp3", …
Zauker
  • 2,344
  • 3
  • 27
  • 36
1
vote
0 answers

Get matched folder from gulp src path using glob

Consider this which checks for JS files in either of two specific locations: gulp.src( "@(Branch|Main)/*.js" ).pipe( _do-stuff_ ) How does one get which folder was matched (Main or Branch) for the current file(s)?
Lance
  • 861
  • 7
  • 12
1
vote
1 answer

debugging gulp glob patterns (node-glob)

I have a gulp task like this: const dest_free = "build/free"; gulp.task("build-free", ["clean-free"], function () { gulp.src(["src/**", "!src/composer.*", "LICENSE", "src/plugins/index.php", "!src/plugins/**"]) …
Gezim
  • 7,112
  • 10
  • 62
  • 98
1
vote
1 answer

Why is my gulp task not converted jsx when using reactify transform with browserify and glob

I have been working on converting a grunt task to gulp. The grunt file looks like this: browserify: { options: { transform: [ require('grunt-react').browserify ] }, client: { src: ['react/**/*.jsx'], dest:…
Finglish
  • 9,692
  • 14
  • 70
  • 114
0
votes
1 answer

Ignoring test files in same dirs as source files in gulp globs

I have folders with test and source files mixed together ├── module-x │   ├── module-x.hbs │   ├── module-x.js │   ├── module-x.less │   └── module-x.test.js ├── module-y │   ├── module-y.hbs │   ├── module-y.js │   ├── module-y.less │   └──…
gotofritz
  • 3,341
  • 1
  • 31
  • 47
-1
votes
1 answer

Copy all sub-directories (except target sub-directory) to a sub-directory

I have D1 SD1 SD2 SD3 dist I want to copy all directories under D1 (except dist) to dist. Obviously I can't copy dist to dist otherwise it will be recursive indefinitely. This is my code gulp.task('extras', () => { return gulp.src([ …
IsmailS
  • 10,797
  • 21
  • 82
  • 134