[英]grunt-contrib-clean to remove all folders/files except for one folder and its contents
[英]glob for all folders within a folder except one named folder
我正在写我的Karma conf
http://karma-runner.github.io/1.0/config/preprocessors.html
预处理器的关键是一个glob字符串。
这适用于构建文件夹中的所有文件夹:
build/**/!(*.spec|*.bundle|*.min).js
但是,我不想要所有文件夹。 我想文件夹1,2,4,5不是文件夹3
我可以用一个字符串写出来(似乎是业力需要的)吗?
就像是
build/(folder1|folder2|folder4|folder5)/!(*.spec|*.bundle|*.min).js
甚至更好
build/** but not folder 3/!(*.spec|*.bundle|*.min).js
这涵盖了它
https://github.com/karma-runner/karma-coverage/issues/13
引用它
您可以使用大括号扩展来完成这项工作。 对于@ chevalric的情况,以下模式将执行此操作:
src/*/{*.js,!(test)/**/*.js}
这扩展到两种模式:
src/*/*.js # Match files in the module root
src/*/!(test)/**/*.js # Match files in all subfolders except test/
后来又说..
src/*/!(test)/**/*.js
工作
但是,对我来说,我无法测试这是否因各种原因而起作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.