Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这样的结构
target_files/ ├──target1/ ├──target2/ └──target3/
例如,我只想包括“target2”并排除其他目标。我如何编写 spec.exclude_files?
我找到了排除文件的示例,但我不明白如何为整个文件夹编写它。
spec.exclude_files = '_private/**/*.{h,m}'
spec.source_files = [ 'target_files/**' ] spec.exclude_files = [ 'target_files/target1/**', 'target_files/target3/**' ]
或者对于您询问的情况,更简单地说:
spec.source_files = [ 'target_files/target2/**' ]
参考
CocoaPods exclude_files
[可可豆]
Pattern: **- 递归匹配目录。
Pattern: **
s.exclude_files = 'target_files/target1/', 'target_files/target3/'
对面是source_files【关于】
source_files