Skip to content

Commit 8b155c0

Browse files
Remove Config factory and rename path argument (#585)
* Rename config path argument * Remove Config factory
1 parent 36967c0 commit 8b155c0

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

Sources/NodesXcodeTemplatesGeneratorExecutable/ConfigFactory.swift

-14
This file was deleted.

Sources/NodesXcodeTemplatesGeneratorExecutable/NodesXcodeTemplatesGeneratorCommand.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ internal struct NodesXcodeTemplatesGeneratorCommand: ParsableCommand {
1515
private var identifier: String
1616

1717
@Option(name: .customLong("config"), help: "The YAML config file path. (optional)")
18-
private var path: String?
18+
private var configPath: String?
1919

2020
internal func run() throws {
21-
let config: ConfigFactory = .init()
22-
try XcodeTemplates(config: config(at: path)).generate(identifier: identifier)
21+
let config: Config = try configPath.flatMap { try Config(at: $0) } ?? Config()
22+
try XcodeTemplates(config: config).generate(identifier: identifier)
2323
}
2424
}

0 commit comments

Comments
 (0)