Skip to content

Commit 9f84712

Browse files
committed
Rename main.swift to MarkdownCommand.swift and add @main
1 parent 72552e2 commit 9f84712

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

@@ -32,7 +32,7 @@ let package = Package(
3232
.product(name: "cmark-gfm", package: cmarkPackageName),
3333
.product(name: "cmark-gfm-extensions", package: cmarkPackageName),
3434
]),
35-
.target(
35+
.executableTarget(
3636
name: "markdown-tool",
3737
dependencies: [
3838
"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
@@ -50,5 +51,3 @@ struct MarkdownCommand: ParsableCommand {
5051
return (stdinString, Document(parsing: stdinString, options: options))
5152
}
5253
}
53-
54-
MarkdownCommand.main()

0 commit comments

Comments
 (0)