From 0bb53ea949764cb8ada68284746dd7ddf763833f Mon Sep 17 00:00:00 2001 From: Sven Weidauer Date: Sat, 8 Oct 2022 11:46:52 +0200 Subject: [PATCH] Remove library target --- Package.swift | 14 ++++---------- .../Extensions/FileWrapper+Extensions.swift | 0 .../Extensions/StringProtocol+Extensions.swift | 0 .../Generators/AndroidGenerator.swift | 0 .../Generators/AssetCatalogGenerator.swift | 0 .../Generators/Generator.swift | 0 .../Generators/HTMLGenerator.swift | 0 .../Importers/Importer.swift | 0 .../Importers/List/ListImporter.swift | 0 .../Importers/List/Scanner+ColorParser.swift | 0 .../{LibMakeColors => MakeColors}/MakeColors.swift | 1 + .../Model/Color+HSV.swift | 0 .../Model/Color.swift | 0 Sources/MakeColors/main.swift | 3 --- .../AssetCatalogFormattingTest.swift | 2 +- Tests/MakeColorsTests/ColorHSVTest.swift | 2 +- Tests/MakeColorsTests/ColorParserTest.swift | 2 +- 17 files changed, 8 insertions(+), 16 deletions(-) rename Sources/{LibMakeColors => MakeColors}/Extensions/FileWrapper+Extensions.swift (100%) rename Sources/{LibMakeColors => MakeColors}/Extensions/StringProtocol+Extensions.swift (100%) rename Sources/{LibMakeColors => MakeColors}/Generators/AndroidGenerator.swift (100%) rename Sources/{LibMakeColors => MakeColors}/Generators/AssetCatalogGenerator.swift (100%) rename Sources/{LibMakeColors => MakeColors}/Generators/Generator.swift (100%) rename Sources/{LibMakeColors => MakeColors}/Generators/HTMLGenerator.swift (100%) rename Sources/{LibMakeColors => MakeColors}/Importers/Importer.swift (100%) rename Sources/{LibMakeColors => MakeColors}/Importers/List/ListImporter.swift (100%) rename Sources/{LibMakeColors => MakeColors}/Importers/List/Scanner+ColorParser.swift (100%) rename Sources/{LibMakeColors => MakeColors}/MakeColors.swift (99%) rename Sources/{LibMakeColors => MakeColors}/Model/Color+HSV.swift (100%) rename Sources/{LibMakeColors => MakeColors}/Model/Color.swift (100%) delete mode 100644 Sources/MakeColors/main.swift diff --git a/Package.swift b/Package.swift index d0b3184..f6195f4 100644 --- a/Package.swift +++ b/Package.swift @@ -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. import PackageDescription @@ -10,17 +10,11 @@ let package = Package( ], dependencies: [ .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: [ - .target( + .executableTarget( name: "MakeColors", - dependencies: [ - "LibMakeColors", - ] - ), - .target( - name: "LibMakeColors", dependencies: [ .product(name: "ArgumentParser", package: "swift-argument-parser"), ] @@ -28,7 +22,7 @@ let package = Package( .testTarget( name: "MakeColorsTests", dependencies: [ - "LibMakeColors", + "MakeColors", .product(name: "RBBJSON", package: "RBBJSON"), ] ), diff --git a/Sources/LibMakeColors/Extensions/FileWrapper+Extensions.swift b/Sources/MakeColors/Extensions/FileWrapper+Extensions.swift similarity index 100% rename from Sources/LibMakeColors/Extensions/FileWrapper+Extensions.swift rename to Sources/MakeColors/Extensions/FileWrapper+Extensions.swift diff --git a/Sources/LibMakeColors/Extensions/StringProtocol+Extensions.swift b/Sources/MakeColors/Extensions/StringProtocol+Extensions.swift similarity index 100% rename from Sources/LibMakeColors/Extensions/StringProtocol+Extensions.swift rename to Sources/MakeColors/Extensions/StringProtocol+Extensions.swift diff --git a/Sources/LibMakeColors/Generators/AndroidGenerator.swift b/Sources/MakeColors/Generators/AndroidGenerator.swift similarity index 100% rename from Sources/LibMakeColors/Generators/AndroidGenerator.swift rename to Sources/MakeColors/Generators/AndroidGenerator.swift diff --git a/Sources/LibMakeColors/Generators/AssetCatalogGenerator.swift b/Sources/MakeColors/Generators/AssetCatalogGenerator.swift similarity index 100% rename from Sources/LibMakeColors/Generators/AssetCatalogGenerator.swift rename to Sources/MakeColors/Generators/AssetCatalogGenerator.swift diff --git a/Sources/LibMakeColors/Generators/Generator.swift b/Sources/MakeColors/Generators/Generator.swift similarity index 100% rename from Sources/LibMakeColors/Generators/Generator.swift rename to Sources/MakeColors/Generators/Generator.swift diff --git a/Sources/LibMakeColors/Generators/HTMLGenerator.swift b/Sources/MakeColors/Generators/HTMLGenerator.swift similarity index 100% rename from Sources/LibMakeColors/Generators/HTMLGenerator.swift rename to Sources/MakeColors/Generators/HTMLGenerator.swift diff --git a/Sources/LibMakeColors/Importers/Importer.swift b/Sources/MakeColors/Importers/Importer.swift similarity index 100% rename from Sources/LibMakeColors/Importers/Importer.swift rename to Sources/MakeColors/Importers/Importer.swift diff --git a/Sources/LibMakeColors/Importers/List/ListImporter.swift b/Sources/MakeColors/Importers/List/ListImporter.swift similarity index 100% rename from Sources/LibMakeColors/Importers/List/ListImporter.swift rename to Sources/MakeColors/Importers/List/ListImporter.swift diff --git a/Sources/LibMakeColors/Importers/List/Scanner+ColorParser.swift b/Sources/MakeColors/Importers/List/Scanner+ColorParser.swift similarity index 100% rename from Sources/LibMakeColors/Importers/List/Scanner+ColorParser.swift rename to Sources/MakeColors/Importers/List/Scanner+ColorParser.swift diff --git a/Sources/LibMakeColors/MakeColors.swift b/Sources/MakeColors/MakeColors.swift similarity index 99% rename from Sources/LibMakeColors/MakeColors.swift rename to Sources/MakeColors/MakeColors.swift index 949bc52..3254d4e 100644 --- a/Sources/LibMakeColors/MakeColors.swift +++ b/Sources/MakeColors/MakeColors.swift @@ -79,6 +79,7 @@ enum HelpTexts { ) } +@main public final class MakeColors: ParsableCommand, Context { @Argument(help: HelpTexts.input) var input: String diff --git a/Sources/LibMakeColors/Model/Color+HSV.swift b/Sources/MakeColors/Model/Color+HSV.swift similarity index 100% rename from Sources/LibMakeColors/Model/Color+HSV.swift rename to Sources/MakeColors/Model/Color+HSV.swift diff --git a/Sources/LibMakeColors/Model/Color.swift b/Sources/MakeColors/Model/Color.swift similarity index 100% rename from Sources/LibMakeColors/Model/Color.swift rename to Sources/MakeColors/Model/Color.swift diff --git a/Sources/MakeColors/main.swift b/Sources/MakeColors/main.swift deleted file mode 100644 index db25b90..0000000 --- a/Sources/MakeColors/main.swift +++ /dev/null @@ -1,3 +0,0 @@ -import LibMakeColors - -MakeColors.main() diff --git a/Tests/MakeColorsTests/AssetCatalogFormattingTest.swift b/Tests/MakeColorsTests/AssetCatalogFormattingTest.swift index 4c0e8e5..d4f9f10 100644 --- a/Tests/MakeColorsTests/AssetCatalogFormattingTest.swift +++ b/Tests/MakeColorsTests/AssetCatalogFormattingTest.swift @@ -1,4 +1,4 @@ -@testable import LibMakeColors +@testable import MakeColors import RBBJSON import XCTest diff --git a/Tests/MakeColorsTests/ColorHSVTest.swift b/Tests/MakeColorsTests/ColorHSVTest.swift index d7bd9dc..9eba183 100644 --- a/Tests/MakeColorsTests/ColorHSVTest.swift +++ b/Tests/MakeColorsTests/ColorHSVTest.swift @@ -1,4 +1,4 @@ -@testable import LibMakeColors +@testable import MakeColors import XCTest final class ColorHSVTest: XCTestCase { diff --git a/Tests/MakeColorsTests/ColorParserTest.swift b/Tests/MakeColorsTests/ColorParserTest.swift index 075c72d..8c3756e 100644 --- a/Tests/MakeColorsTests/ColorParserTest.swift +++ b/Tests/MakeColorsTests/ColorParserTest.swift @@ -1,4 +1,4 @@ -@testable import LibMakeColors +@testable import MakeColors import XCTest final class ColorParserTest: XCTestCase {