node.js - GruntJS recursive globbing difference -


what's difference between **/*.js , {,*/}*.js in gruntjs node globbing?

gruntjs uses globbing patterns based node-glob library.

based on this, * have next meanings:

  • path/* - files , folders in path not recoursive
  • path/** - in path recursively
  • path/*.* - files , folders point in name; matches file.txt, .gitignore, noextension., etc.

to put light, may read article on glob patterns.

in documentation have glob primer, has example:

before parsing path part patterns, braced sections expanded set. braced sections start { , end }, number of comma-delimited sections within. braced sections may contain slash characters, a{/b/c,bcd} expand a/b/c , abcd.

this case {,*/}*.js about.

i'd highly recommend use syntax ** (in case it's **/*.js, filtering .js files only) when need iterate path recursively.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -