Skip to content

Commit

Permalink
Updated Swift Argument Parser
Browse files Browse the repository at this point in the history
  • Loading branch information
inket committed May 5, 2021
1 parent 1373d21 commit cf657b6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/apple/swift-argument-parser",
"state": {
"branch": null,
"revision": "9f04d1ff1afbccd02279338a2c91e5f27c45e93a",
"version": "0.0.5"
"revision": "986d191f94cec88f6350056da59c2e59e83d1229",
"version": "0.4.3"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ let package = Package(
.executable(name: "transmog", targets: ["Transmog"])
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser", from: "0.0.1"),
.package(url: "https://github.com/thii/SwiftHEXColors", from: "1.4.0")
.package(url: "https://github.com/apple/swift-argument-parser", .upToNextMajor(from: "0.4.0")),
.package(url: "https://github.com/thii/SwiftHEXColors", .upToNextMajor(from: "1.4.0")),
],
targets: [
.target(
Expand Down
8 changes: 3 additions & 5 deletions Sources/Transmog/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,18 @@ struct Transmog: ParsableCommand {
)

@Argument(
// default: "~/Desktop/theme.json", // uncomment for testing within Xcode
help: ArgumentHelp(
"Path or URL of the VSCode theme file (.json). GitHub links are also supported.",
valueName: "theme-file-path-or-url"
)
)
var pathOrURL: String
var pathOrURL: String // = "~/Desktop/theme.json" // uncomment default value for testing within Xcode

@Option(
name: .shortAndLong,
default: "~/Library/Developer/Xcode/UserData/FontAndColorThemes/",
help: "Output directory path (optional)"
)
var output: String
var output: String = "~/Library/Developer/Xcode/UserData/FontAndColorThemes/"

@Flag(
name: .shortAndLong,
Expand All @@ -39,7 +37,7 @@ struct Transmog: ParsableCommand {
This will cause theme colors to look different in Xcode from what they appear like in VSCode.
"""
)
var skipColorProfileCorrection: Bool
var skipColorProfileCorrection: Bool = false

func run() throws {
ConversionParameters.skipColorProfileCorrection = skipColorProfileCorrection
Expand Down

0 comments on commit cf657b6

Please sign in to comment.