Skip to content

Commit 94969fd

Browse files
committed
Rename main.swift to MarkdownCommand.swift and add @main
1 parent 6d11986 commit 94969fd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.3
1+
// swift-tools-version:5.4
22
/*
33
This source file is part of the Swift.org open source project
44

@@ -30,7 +30,7 @@ let package = Package(
3030
.product(name: "cmark-gfm", package: "swift-cmark"),
3131
.product(name: "cmark-gfm-extensions", package: "swift-cmark"),
3232
]),
33-
.target(
33+
.executableTarget(
3434
name: "markdown-tool",
3535
dependencies: [
3636
"Markdown",

Sources/markdown-tool/main.swift renamed to Sources/markdown-tool/MarkdownCommand.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import ArgumentParser
1212
import Foundation
1313
import Markdown
1414

15+
@main
1516
struct MarkdownCommand: ParsableCommand {
1617
enum Error: LocalizedError {
1718
case couldntDecodeInputAsUTF8
@@ -45,5 +46,3 @@ struct MarkdownCommand: ParsableCommand {
4546
return (stdinString, Document(parsing: stdinString, options: options))
4647
}
4748
}
48-
49-
MarkdownCommand.main()

0 commit comments

Comments
 (0)