[英]selecting every file in every sub-folder
This is hard to google cause I don't know how these expressions are called. 这很难谷歌,因为我不知道这些表达式的调用方式。 In my the server part of my grunt-contrib-watch task I want to listen for all file changes in all files in all subfolders in my server folder. 在我的我的咕噜-的contrib手表任务的服务器部分,我要听在我的服务器文件夹中的所有文件中的所有文件改变所有子文件夹。 Does it have to be done like this, eg ** = subfolder, * is file? 是否必须这样做,例如** =子文件夹,*是文件?
files : [ 'server/**/**/*.*','server/**/*.*','server/*.*']
I've also seen something like: 我也看过类似的东西:
files : [ 'server/{,*/}*.*' ]
but what are the curly braces doing there? 但是那里的花括号在做什么? In my conquest to pretty syntax, any help is greatly appreciated. 在征服漂亮语法的过程中,我们将不胜感激。 Thanks! 谢谢!
You can find the answer here: How grunt watch files in sub folders? 您可以在此处找到答案: 如何监视子文件夹中的文件? , he gave the link to the document too. ,他也提供了指向文档的链接。 (So you can go vote up for his answer ^^) (所以您可以投票支持他的回答^^)
In your case it should be: ['server/**/*.*']
if you want every file, otherwise you can change the last * as js like this : ['server/**/*.js']
在您的情况下,如果需要每个文件,则应为: ['server/**/*.*']
,否则可以将最后一个*更改为js,例如: ['server/**/*.js']
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.