[英]Grunt Globbing patterns
What is the pattern needed to achieve the following. 实现以下所需的模式是什么?
.tmp
.tmp
中的所有html文件 This is to register livereload
task in Grunt file. 这是在Grunt文件中注册
livereload
任务。
I tried few varieties of below config. 我试过以下几种配置。 It matches all files in
.tmp
, but not recursively in .tmp/views
它匹配
.tmp
中的所有文件,但不会在.tmp/views
递归
Also tried, 也尝试过,
'.tmp/{,views/**/}*.html'
but the same result. 但结果相同。
livereload: { options: { livereload: LIVERELOAD_PORT }, files: [ '.tmp/{,views/**}*.html' ] }
You should be able to get the matching you need by passing two elements in the files array: 您应该能够通过在files数组中传递两个元素来获得所需的匹配:
files: [
'.tmp/*.html',
'.tmp/views/**/*.html',
]
This will match any .html
files directly below .tmp/
, as well as any .html
file in .tmp/views/
, whether directly under that directory or deeper (the /**/
part). 这将匹配
.tmp/
下面的任何.html
文件,以及.tmp/views/
任何.html
文件,无论是直接在该目录下还是更深层( /**/
部分)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.