forked from MarcoEidinger/SwiftFormatPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.swift
37 lines (35 loc) · 1.17 KB
/
Package.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// swift-tools-version: 5.6
import PackageDescription
let package = Package(
name: "SwiftFormatPlugin",
products: [
.plugin(name: "SwiftFormatPlugin", targets: ["SwiftFormatPlugin"]),
.plugin(name: "SwiftFormat", targets: ["SwiftFormat"]),
],
dependencies: [],
targets: [
.plugin(
name: "SwiftFormatPlugin",
capability: .buildTool(),
dependencies: ["swiftformat"]
),
.plugin(
name: "SwiftFormat",
capability: .command(
intent: .custom(
verb: "swiftformat",
description: "Formats source code"
),
permissions: [
.writeToPackageDirectory(reason: "This command reformats source files"),
]
),
dependencies: [.target(name: "swiftformat")]
),
.binaryTarget(
name: "swiftformat",
url: "https://github.com/nicklockwood/SwiftFormat/releases/download/0.55.5/swiftformat.artifactbundle.zip",
checksum: "2c6e8903b88ca94f621586a91617c89337f53460bb3db00e3de655f96895a1a8"
)
]
)