解析包.swift清单

表现

概述

manifestation 是一个命令行工具,用于解析 Swift 包清单(包.swift文件)的内容并基于它生成报告。

安装

git clone https://github.com/atierian/manifestation.git或者如果你有这样的倾向,请使用SSH。

cd manifestation

然后决定是否要全局安装它。如果是这样,您将运行:

swift build --configuration release

cp -f .build/release/manifestation /usr/local/bin/manifestation

如果您不想这样做,您只需要在下面列出的命令前面加上例如swift run

swift run manifestation ~/Projects/FooKit --dump

OVERVIEW: Parse a Package.swift manifest.

USAGE: manifestation <path> [--dump] [--verbose]

ARGUMENTS:
  <path>                  The absolute path to the Package.swift. e.g. '~/Foo/Bar

OPTIONS:
  -d, --dump              Dump the entire package manifest
  -v, --verbose           Verbose logging. This will print all events from the 'ObservabilitySystem'
  -h, --help              Show help information.

用法

提供包含 . 例如,如果你有一个 这里 ,你将运行:Package.swiftPackage.swift/Users/Foo/Projects/FooKit/Package.swift

manifestation /Users/Foo/Projects/FooKit --verbosemanifestation ~/Projects/FooKit --verbose

下面是 of 的输出作为示例:Package.swiftmanifestation

Loading manifest: [debug]: evaluating manifest for 'manifestation' v. unknown
Loading manifest: [debug]: loading manifest for 'manifestation' v. unknown from cache
Loading manifest: [debug]: loading manifest for 'manifestation' v. unknown from cache
Loading manifest: [debug]: evaluating manifest for 'swift-argument-parser' v. unknown
Loading manifest: [debug]: evaluating manifest for 'swift-package-manager' v. unknown
Loading manifest: [debug]: evaluating manifest for 'swift-llbuild' v. unknown
Loading manifest: [debug]: evaluating manifest for 'swift-crypto' v. 1.1.7
Loading manifest: [debug]: evaluating manifest for 'swift-system' v. 1.1.1
Loading manifest: [debug]: evaluating manifest for 'swift-collections' v. 1.0.2
Loading manifest: [debug]: evaluating manifest for 'swift-tools-support-core' v. unknown
Loading manifest: [debug]: evaluating manifest for 'swift-driver' v. unknown
Loading manifest: [debug]: evaluating manifest for 'yams' v. 4.0.6
Validating package dependencies: [info]: dependency on 'swift-argument-parser' is represented by similar locations ('https://github.com/apple/swift-argument-parser' and 'https://github.com/apple/swift-argument-parser.git') which are treated as the same canonical location 'github.com/apple/swift-argument-parser'.
>>>>> Products <<<<<
Name: manifestation
    - Type: executable
    - Targets: ["Manifestation"]

>>>>> Targets <<<<<
Name: Manifestation
    - Type: executable
    - Dependencies: [ ArgumentParser, SwiftPM ]
    - Path:
    - URL:
    - Settings: []
    - Exclude: []
    - Resources: []

Name: ManifestationTests
    - Type: test
    - Dependencies: [ Manifestation ]
    - Path:
    - URL:
    - Settings: []
    - Exclude: []
    - Resources: []

Using the flag with dump the entire object into your console, providing a lot of detail.--dumpManifest

Contributions

Contributions are absolutely welcome. Open an issue to discuss or a PR directly. Planned feature additions are tracked in Issues.

GitHub

点击跳转