Search code examples
node.jsunixgruntjsglobnpm-scripts

What does ** mean in a path?


ive been setting up Grunt for my web app to auto build it and im seeing paths like

/path/to/file/**/*.js

i understand what one wildcard means, but what does 2 in a row mean?


Solution

  • /path/to/file/**/*.js matches any number of directories between /path/to/file/ and /*.js. As opposed to /path/to/file/*/*.js, which matches a single directory between /path/to/file/ and /*.js.