GifsAndScreenshots
文件夹。
有一种方法可以防止下载这些不必要的文件?
https://github.com/RastislavMirek/FlexColorPicker
→确认
您可以使用
exclude
文件中的目标上的Package.swift
docs
:
/// Create a library or executable target.
///
/// A target can either contain Swift or C-family source files. You cannot
/// mix Swift and C-family source files within a target. A target is
/// considered to be an executable target if there is a `main.swift`,
/// `main.m`, `main.c` or `main.cpp` file in the target's directory. All
/// other targets are considered to be library targets.
///
/// - Parameters:
/// - name: The name of the target.
/// - dependencies: The dependencies of the target. These can either be other targets in the package or products from package dependencies.
/// - path: The custom path for the target. By default, targets will be looked up in the <package-root>/Sources/<target-name> directory.
/// Do not escape the package root, i.e. values like "../Foo" or "/Foo" are invalid.
/// - exclude: A list of paths to exclude from being considered source files. This path is relative to the target's directory.
/// - sources: An explicit list of source files.
/// - publicHeadersPath: The directory containing public headers of a C-family family library target.
/// - cSettings: The C settings for this target.
/// - cxxSettings: The C++ settings for this target.
/// - swiftSettings: The Swift settings for this target.
/// - linkerSettings: The linker settings for this target.
...
在包装中使用它。Swift文件看起来像这样:,developer.apple.com有一些目标 - > dubl参数
可以通过在要排除的文件夹中添加一个文件,并使用这些内容来排除包装夹,从包装中排除文件夹:
我知道git可以从仓库中克服特定的路径,但我不确定限制。为了支持SwiftPM的此类功能,需要提出快速进化提案。