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)

4

2 回答 2

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".

于 2016-05-15T19:33:32.407 回答
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

于 2016-05-15T21:32:56.357 回答