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 inpathnot recoursivepath/**- inpathrecursivelypath/*.*- files , folders point in name; matchesfile.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}expanda/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
Post a Comment