Remove library target

This commit is contained in:
Sven Weidauer 2022-10-08 11:46:52 +02:00
parent 012203a4f3
commit 0bb53ea949
17 changed files with 8 additions and 16 deletions

View file

@ -1,4 +1,4 @@
// swift-tools-version:5.3 // swift-tools-version:5.7
// The swift-tools-version declares the minimum version of Swift required to build this package. // The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription import PackageDescription
@ -10,17 +10,11 @@ let package = Package(
], ],
dependencies: [ dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser", .upToNextMinor(from: "0.3.1")), .package(url: "https://github.com/apple/swift-argument-parser", .upToNextMinor(from: "0.3.1")),
.package(url: "https://github.com/robb/RBBJSON", .branch("main")), .package(url: "https://github.com/robb/RBBJSON", branch: "main"),
], ],
targets: [ targets: [
.target( .executableTarget(
name: "MakeColors", name: "MakeColors",
dependencies: [
"LibMakeColors",
]
),
.target(
name: "LibMakeColors",
dependencies: [ dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"), .product(name: "ArgumentParser", package: "swift-argument-parser"),
] ]
@ -28,7 +22,7 @@ let package = Package(
.testTarget( .testTarget(
name: "MakeColorsTests", name: "MakeColorsTests",
dependencies: [ dependencies: [
"LibMakeColors", "MakeColors",
.product(name: "RBBJSON", package: "RBBJSON"), .product(name: "RBBJSON", package: "RBBJSON"),
] ]
), ),

View file

@ -79,6 +79,7 @@ enum HelpTexts {
) )
} }
@main
public final class MakeColors: ParsableCommand, Context { public final class MakeColors: ParsableCommand, Context {
@Argument(help: HelpTexts.input) @Argument(help: HelpTexts.input)
var input: String var input: String

View file

@ -1,3 +0,0 @@
import LibMakeColors
MakeColors.main()

View file

@ -1,4 +1,4 @@
@testable import LibMakeColors @testable import MakeColors
import RBBJSON import RBBJSON
import XCTest import XCTest

View file

@ -1,4 +1,4 @@
@testable import LibMakeColors @testable import MakeColors
import XCTest import XCTest
final class ColorHSVTest: XCTestCase { final class ColorHSVTest: XCTestCase {

View file

@ -1,4 +1,4 @@
@testable import LibMakeColors @testable import MakeColors
import XCTest import XCTest
final class ColorParserTest: XCTestCase { final class ColorParserTest: XCTestCase {