SKGenericModule

open class SKGenericModule<S, T> where S : SKBaseSubstructure, T : SKGenericSwiftDocs<S>

Represents a generic SourceKitten documentation request for a given module.

  • The backing SourceKitten module.

    Declaration

    Swift

    public let module: Module
  • The path to the SDK the module was compiled with.

    Declaration

    Swift

    public lazy var sdkPath: String? { get set }
  • The target (triple) architecture the module was compiled for (e.g. "arm64-apple-ios12.1").

    Declaration

    Swift

    public lazy var target: String? { get set }
  • The name of the module.

    Declaration

    Swift

    public var name: String { get }
  • The compiler arguments required by SourceKit to process the module’s source files.

    Declaration

    Swift

    public var compilerArguments: [String] { get }
  • The source files in this module.

    The values are absolute file paths.

    Declaration

    Swift

    public var sourceFiles: [String] { get }
  • The documentation for the module’s source files.

    Warning

    Typically expensive computed property.

    Declaration

    Swift

    open var docs: [T] { get }
  • Creates a new synchronous SourceKitten module information request.

    Warning

    The request is sent synchronously, so ensure this initializer is not called on the main thread.

    Throws

    A SKError, if an error occurs.

    Declaration

    Swift

    public init(xcodeBuildArguments: [String],
                name: String? = nil,
                inPath path: String = FileManager.default.currentDirectoryPath) throws

    Parameters

    xcodeBuildArguments

    The arguments necessary pass in to xcodebuild to build this module.

    name

    The module name. Will be parsed from xcodebuild output if nil.

    path

    The path to run xcodebuild from. Uses current path by default.