diff --git a/Package.swift b/Package.swift index 34ca27e..68ad3cf 100644 --- a/Package.swift +++ b/Package.swift @@ -1,20 +1,21 @@ // swift-tools-version:5.3 -// The swift-tools-version declares the minimum version of Swift required to build this package. + import PackageDescription let package = Package( name: "SwiftUIcon", products: [ - .library( - name: "SwiftUIcon", - targets: ["SwiftUIcon"]), - ], - dependencies: [ + .library(name: "SwiftUIcon", targets: ["SwiftUIcon"]), ], + dependencies: [], targets: [ .target( name: "SwiftUIcon", - dependencies: [], - path: "Icon"), + exclude: [ + "main.swift", + "IconGenerator.swift" + ], + sources: ["Icon+PreviewHelpers.swift"] + ), ] ) diff --git a/Icon/Icon+PreviewHelpers.swift b/Sources/SwiftUIcon/Icon+PreviewHelpers.swift similarity index 100% rename from Icon/Icon+PreviewHelpers.swift rename to Sources/SwiftUIcon/Icon+PreviewHelpers.swift diff --git a/IconGenerator/IconGenerator.swift b/Sources/SwiftUIcon/IconGenerator.swift similarity index 100% rename from IconGenerator/IconGenerator.swift rename to Sources/SwiftUIcon/IconGenerator.swift diff --git a/IconGenerator/main.swift b/Sources/SwiftUIcon/main.swift similarity index 100% rename from IconGenerator/main.swift rename to Sources/SwiftUIcon/main.swift diff --git a/build-script.sh b/build-script.sh index aa8d332..999e139 100755 --- a/build-script.sh +++ b/build-script.sh @@ -17,9 +17,9 @@ trap "rm -f $TMPFILE" EXIT SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -HELPER="$SCRIPT_DIR/Icon/Icon+PreviewHelpers.swift" -GENERATOR="$SCRIPT_DIR/IconGenerator/IconGenerator.swift" -MAIN="$SCRIPT_DIR/IconGenerator/main.swift" +HELPER="$SCRIPT_DIR/Sources/SwiftUIcon/Icon+PreviewHelpers.swift" +GENERATOR="$SCRIPT_DIR/Sources/SwiftUIcon/IconGenerator.swift" +MAIN="$SCRIPT_DIR/Sources/SwiftUIcon/main.swift" # Concatenate all files and remove import that is most likely in the input file cat $SCRIPT_INPUT_FILE_0 $HELPER $GENERATOR $MAIN | grep -v "import\sSwiftUIcon" > $TMPFILE