Skip to content

Instantly share code, notes, and snippets.

@DavidPiper94
Last active October 19, 2022 05:05
Show Gist options
  • Save DavidPiper94/bbda8829c6cb91fe82c208a8072a6d59 to your computer and use it in GitHub Desktop.
Save DavidPiper94/bbda8829c6cb91fe82c208a8072a6d59 to your computer and use it in GitHub Desktop.
Example code for article about ArgumentParser - Defining the executable and dependencies
// swift-tools-version: 5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "CLINotes",
products: [
.executable(
name: "CLINotes",
targets: ["CLINotes"]
),
],
dependencies: [
.package(
url: "https://github.com/apple/swift-argument-parser.git",
from: "1.0.0"
),
],
targets: [
.executableTarget(
name: "CLINotes",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser")
]
),
]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment