Template support for input parameters #4

Merged
javier merged 81 commits from feature/arguments-templating into main 2025-02-17 22:11:06 +00:00
3 changed files with 7 additions and 7 deletions
Showing only changes of commit d3283c912f - Show all commits

View File

@ -1,5 +1,5 @@
import Foundation
// MARK: - BundleServicing
// MARK: - Bundleable
extension Bundle: BundleServicing {}
extension Bundle: Bundleable {}

View File

@ -1,6 +1,6 @@
import Foundation
public protocol BundleServicing {
public protocol Bundleable {
// MARK: Functions

View File

@ -4,16 +4,16 @@ public struct CopyFilesTask {
// MARK: Properties
private let bundleService: BundleServicing
private let bundle: Bundleable
private let fileService: FileServicing
// MARK: Initialisers
public init(
bundleService: BundleServicing? = nil,
bundle: Bundleable? = nil,
fileService: FileServicing
) {
self.bundleService = bundleService ?? Bundle.module
self.bundle = bundle ?? Bundle.module
self.fileService = fileService
}
@ -21,7 +21,7 @@ public struct CopyFilesTask {
public func callAsFunction(to rootFolder: URL) async throws (FileServiceError) {
for file in File.allCases {
guard let source = bundleService.url(
guard let source = bundle.url(
forResource: file.rawValue,
withExtension: nil,
subdirectory: file.resourcePath