1

i started to use gulp, i have a little difficulty understand how globs work in gulp.

Why do **/* copy all directory structure(how it work)

KarimS
  • 3,812
  • 9
  • 41
  • 64

2 Answers2

5

Gulp uses the glob module. Rules for globbing can be found in its repo.

  • * Matches 0 or more characters in a single path portion
  • ** If a "globstar" is alone in a path portion, then it matches zero or more directories and subdirectories searching for matches. It does not crawl symlinked directories.

** means "recursively descend through subdirectories" while * means "match any path".

Joseph
  • 117,725
  • 30
  • 181
  • 234
2

Extending your folder structure css/**/*.css

** means recursive.

This means your telling gulp to go inside css folder and all it's subdirectories and compile all files that has an extension .css

BonTheBeerman
  • 304
  • 2
  • 8