Skip to content

Commit

Permalink
Rename main.swift to MarkdownCommand.swift and add @main
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Ye committed Nov 2, 2021
1 parent df90f9f commit a95b0b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Package.swift
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version:5.4
/*
This source file is part of the Swift.org open source project
Expand Down Expand Up @@ -30,7 +30,7 @@ let package = Package(
.product(name: "cmark-gfm", package: "swift-cmark"),
.product(name: "cmark-gfm-extensions", package: "swift-cmark"),
]),
.target(
.executableTarget(
name: "markdown-tool",
dependencies: [
"Markdown",
Expand Down
Expand Up @@ -12,6 +12,7 @@ import ArgumentParser
import Foundation
import Markdown

@main
struct MarkdownCommand: ParsableCommand {
enum Error: LocalizedError {
case couldntDecodeInputAsUTF8
Expand Down Expand Up @@ -50,5 +51,3 @@ struct MarkdownCommand: ParsableCommand {
return (stdinString, Document(parsing: stdinString, options: options))
}
}

MarkdownCommand.main()

0 comments on commit a95b0b5

Please sign in to comment.