From 83ea5d0f5a9fd0082c61e090f4b656c7b58ee0be Mon Sep 17 00:00:00 2001 From: Hiroshi Kimura Date: Fri, 6 Dec 2024 11:48:51 +0900 Subject: [PATCH] Package (#1) --- Package.swift | 27 ++++++++++++++----- .../CATransactionQueue.swift | 0 .../WithPrerender.swift} | 1 + 3 files changed, 22 insertions(+), 6 deletions(-) rename Sources/{RunLoopQueue => CATransactionQueue}/CATransactionQueue.swift (100%) rename Sources/{RunLoopQueue/Source.swift => WithPrerender/WithPrerender.swift} (83%) diff --git a/Package.swift b/Package.swift index 5076016..56e1924 100644 --- a/Package.swift +++ b/Package.swift @@ -4,21 +4,36 @@ import PackageDescription let package = Package( - name: "RunLoopQueue", + name: "WithPrerender", + platforms: [ + .iOS(.v13), + .macOS(.v10_15), + .tvOS(.v13), + .watchOS(.v10), + .visionOS(.v1) + ], products: [ // Products define the executables and libraries a package produces, making them visible to other packages. .library( - name: "RunLoopQueue", - targets: ["RunLoopQueue"]) + name: "WithPrerender", + targets: ["WithPrerender"] + ), + .library( + name: "CATransactionQueue", + targets: ["CATransactionQueue"] + ), ], targets: [ // Targets are the basic building blocks of a package, defining a module or a test suite. // Targets can depend on other targets in this package and products from dependencies. + .target(name: "CATransactionQueue"), .target( - name: "RunLoopQueue"), + name: "WithPrerender", + dependencies: ["CATransactionQueue"] + ), .testTarget( - name: "RunLoopQueueTests", - dependencies: ["RunLoopQueue"] + name: "WithPrerenderTests", + dependencies: ["WithPrerender"] ), ], swiftLanguageModes: [.v6] diff --git a/Sources/RunLoopQueue/CATransactionQueue.swift b/Sources/CATransactionQueue/CATransactionQueue.swift similarity index 100% rename from Sources/RunLoopQueue/CATransactionQueue.swift rename to Sources/CATransactionQueue/CATransactionQueue.swift diff --git a/Sources/RunLoopQueue/Source.swift b/Sources/WithPrerender/WithPrerender.swift similarity index 83% rename from Sources/RunLoopQueue/Source.swift rename to Sources/WithPrerender/WithPrerender.swift index da98a98..52b7b52 100644 --- a/Sources/RunLoopQueue/Source.swift +++ b/Sources/WithPrerender/WithPrerender.swift @@ -1,3 +1,4 @@ +import CATransactionQueue @MainActor public func withPrerender(_ body: @escaping @MainActor () -> Void) {