From e5f69936e94fd29d58118ece92cc6d5389c5a69f Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 14 Nov 2023 10:46:01 -0600 Subject: [PATCH] Signed-off-by: Matt Bruce --- .../contents.xcworkspacedata | 7 ++ .../xcode/xcshareddata/xcschemes/VDS.xcscheme | 66 +++++++++++++++++++ Package.resolved | 14 ++++ Package.swift | 44 +++++++++++++ Scripts/vds-docs.sh | 35 ++++++++++ VDS.xcodeproj/project.pbxproj | 4 ++ .../xcshareddata/xcschemes/VDS.xcscheme | 66 +++++++++++++++++++ .../contents.xcworkspacedata | 7 ++ 8 files changed, 243 insertions(+) create mode 100644 .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata create mode 100644 .swiftpm/xcode/xcshareddata/xcschemes/VDS.xcscheme create mode 100644 Package.resolved create mode 100644 Package.swift create mode 100644 Scripts/vds-docs.sh create mode 100644 VDS.xcodeproj/xcshareddata/xcschemes/VDS.xcscheme create mode 100644 VDS/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/VDS.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/VDS.xcscheme new file mode 100644 index 00000000..b9095aae --- /dev/null +++ b/.swiftpm/xcode/xcshareddata/xcschemes/VDS.xcscheme @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 00000000..528fbc10 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "swift-docc-plugin", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-docc-plugin", + "state" : { + "revision" : "3303b164430d9a7055ba484c8ead67a52f7b74f6", + "version" : "1.0.0" + } + } + ], + "version" : 2 +} diff --git a/Package.swift b/Package.swift new file mode 100644 index 00000000..01ea2a04 --- /dev/null +++ b/Package.swift @@ -0,0 +1,44 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "VDS", + platforms: [ + .iOS(.v14) // Adjust the version as needed for your project + ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "VDS", + targets: ["VDS"]), + ], + dependencies: [ + .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0") + ], + targets: [ + .target( + name: "VDS", + dependencies: [ + .target(name: "UIKit"), + .target(name: "VDSColorTokens"), + .target(name: "VDSFormControlsTokens"), + .target(name: "VDSTypographyTokens") + ], + path: "VDS", // Adjust the path to your sources + resources: [ + .process("SupportingFiles/Fonts"), // Process font files + .process("SupportingFiles/Icons.xcassets") // Include xcassets + ]), + .binaryTarget( + name: "VDSColorTokens", + path: "../SharedFrameworks/VDSColorTokens.xcframework"), + .binaryTarget( + name: "VDSFormControlsTokens", + path: "../SharedFrameworks/VDSFormControlsTokens.xcframework"), + .binaryTarget( + name: "VDSTypographyTokens", + path: "../SharedFrameworks/VDSTypographyTokens.xcframework") + ] +) diff --git a/Scripts/vds-docs.sh b/Scripts/vds-docs.sh new file mode 100644 index 00000000..62523c65 --- /dev/null +++ b/Scripts/vds-docs.sh @@ -0,0 +1,35 @@ + +#!/bin/bash + +# Define your scheme and output path +SCHEME="VDS" +OUTPUT_PATH="/Users/mattbruce/Desktop/VDSDocs" +HOSTING_BASE_PATH="/" + +# Generate the DocC archive +echo "Generating the DocC archive..." +xcodebuild docbuild \ + -scheme $SCHEME \ + -destination 'generic/platform=iOS' \ + -derivedDataPath ./.build + +# Find the path to the DocC archive +ARCHIVE_PATH=$(find ./.build -name "*.doccarchive" -print -quit) + +if [ -z "$ARCHIVE_PATH" ]; then + echo "DocC archive not found. Exiting..." + exit 1 +fi + +echo "Archive found at $ARCHIVE_PATH" + +# Convert the archive to static hosting with the correct base path +echo "Converting the DocC archive to static hosting format..." +xcrun docc convert $ARCHIVE_PATH --output-path $OUTPUT_PATH --hosting-base-path $HOSTING_BASE_PATH + +# Archive the documentation for upload +echo "Archiving the documentation..." +zip -r docs.zip $OUTPUT_PATH + +echo "Archive docs.zip is ready for upload." + diff --git a/VDS.xcodeproj/project.pbxproj b/VDS.xcodeproj/project.pbxproj index c2fc5e62..a8a75607 100644 --- a/VDS.xcodeproj/project.pbxproj +++ b/VDS.xcodeproj/project.pbxproj @@ -117,6 +117,7 @@ EAC925842911C63100091998 /* Colorable.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAA5EEDF28F49DB3003B3210 /* Colorable.swift */; }; EAC9258C2911C9DE00091998 /* InputField.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAC925872911C9DE00091998 /* InputField.swift */; }; EAC9258F2911C9DE00091998 /* EntryFieldBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAC9258B2911C9DE00091998 /* EntryFieldBase.swift */; }; + EAC9FE572AFED73900895F58 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAC9FE562AFED73900895F58 /* Package.swift */; }; EAD062A72A3B67770015965D /* UIView+CALayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAD062A62A3B67770015965D /* UIView+CALayer.swift */; }; EAD062B02A3B873E0015965D /* BadgeIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAD062AF2A3B873E0015965D /* BadgeIndicator.swift */; }; EAD0688E2A55F819002E3A2D /* Loader.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAD0688D2A55F819002E3A2D /* Loader.swift */; }; @@ -265,6 +266,7 @@ EAC925822911B35300091998 /* TextLinkCaret.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextLinkCaret.swift; sourceTree = ""; }; EAC925872911C9DE00091998 /* InputField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InputField.swift; sourceTree = ""; }; EAC9258B2911C9DE00091998 /* EntryFieldBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EntryFieldBase.swift; sourceTree = ""; }; + EAC9FE562AFED73900895F58 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; EAD062A62A3B67770015965D /* UIView+CALayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+CALayer.swift"; sourceTree = ""; }; EAD062AF2A3B873E0015965D /* BadgeIndicator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BadgeIndicator.swift; sourceTree = ""; }; EAD0688D2A55F819002E3A2D /* Loader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Loader.swift; sourceTree = ""; }; @@ -415,6 +417,7 @@ EA3361FE2891E14C0071C351 /* SupportingFiles */, EA336170288B19200071C351 /* VDS.docc */, EA33616F288B19200071C351 /* VDS.h */, + EAC9FE562AFED73900895F58 /* Package.swift */, ); path = VDS; sourceTree = ""; @@ -952,6 +955,7 @@ EA3361C9289054C50071C351 /* Surfaceable.swift in Sources */, EAB5FEED2927E1B200998C17 /* ButtonGroupPositionLayout.swift in Sources */, EA4DB30228DCBCA500103EE3 /* Badge.swift in Sources */, + EAC9FE572AFED73900895F58 /* Package.swift in Sources */, EA33624728931B050071C351 /* Initable.swift in Sources */, EAF7F0A4289B017C00B287F5 /* LabelAttributeModel.swift in Sources */, EA0B18022A9E236900F2D0CD /* SelectorGroupBase.swift in Sources */, diff --git a/VDS.xcodeproj/xcshareddata/xcschemes/VDS.xcscheme b/VDS.xcodeproj/xcshareddata/xcschemes/VDS.xcscheme new file mode 100644 index 00000000..cf4d56cd --- /dev/null +++ b/VDS.xcodeproj/xcshareddata/xcschemes/VDS.xcscheme @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/VDS/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/VDS/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/VDS/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + +