我正在根据以下内容写我的Karma conf
http://karma-runner.github.io/1.0/config/preprocessors.html
预处理程序的密钥是全局字符串。
这适用于构建文件夹中的所有文件夹:
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
工作了
但是,对我来说,由于种种原因我无法测试它是否有效。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句