hllau hllau -3 years ago 122
Node.js Question

What does `{,*/}` mean in paths of Gruntfile.js?

In

Gruntfile.js
, I have got:

watch: {
styles: {
files: [
'<%= yeoman.app %>/styles/{,*/}*.less'
],
tasks: ['copy:styles', 'autoprefixer']
}
}


For the path, what does
{,*/}
mean indeed? How does it differ to using double asterisks
**/
?

Answer Source

This pattern is widely used in yeoman templates: it means to look only one level deep inside folder hierarchy. It is used mostly for performance reasons since watching too many files simultaneously can be slow (or even impossible).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download