feat: Adds generate commands that call to pandoc to generate pdf, latex, and html files from a project.
This commit is contained in:
@@ -143,23 +143,6 @@ func generateFindEnvironments(file: File) -> [[String: String]] {
|
||||
]
|
||||
}
|
||||
|
||||
// swiftlint:disable force_try
|
||||
func withTemporaryDirectory(
|
||||
_ operation: @Sendable (URL) async throws -> Void
|
||||
) async rethrows {
|
||||
let dir = FileManager.default.temporaryDirectory
|
||||
let tempDir = dir.appending(path: UUID().uuidString)
|
||||
|
||||
try! FileManager.default.createDirectory(
|
||||
atPath: tempDir.cleanFilePath,
|
||||
withIntermediateDirectories: false
|
||||
)
|
||||
try await operation(tempDir)
|
||||
try! FileManager.default.removeItem(at: tempDir)
|
||||
}
|
||||
|
||||
// swiftlint:enable force_try
|
||||
|
||||
func withGeneratedConfigFile(
|
||||
named fileName: String,
|
||||
client: ConfigurationClient,
|
||||
|
||||
Reference in New Issue
Block a user