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 **/?
These are globbing patterns for Grunt, supported by the node-glob and minimatch libraries.
Basically:
* matches any number of characters, but not /
** matches any number of characters, including /, as long as it's the only thing in a path part{} allows for a comma-separated list of "or" expressions
So, styles/{,*/}*.less matches the following files:
styles directorystyles directory (but no deeper)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With