Skip to content

Commit 7c084b3

Browse files
authored
chore: sync development to main
2 parents 29dcd14 + 8a341a2 commit 7c084b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+10249
-10039
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ permissions:
99
jobs:
1010
test:
1111
runs-on: macos-latest
12+
if: ${{ !contains(github.event.head_commit.message, 'docs') }}
1213
steps:
1314
- name: Checkout code
1415
uses: actions/checkout@v4

.swift-format

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,62 @@
11
{
2-
"lineLength": 180,
2+
"indentation" : {
3+
"spaces" : 4
4+
},
5+
"tabWidth" : 4,
6+
"fileScopedDeclarationPrivacy" : {
7+
"accessLevel" : "private"
8+
},
9+
"spacesAroundRangeFormationOperators" : false,
10+
"indentConditionalCompilationBlocks" : false,
11+
"indentSwitchCaseLabels" : false,
12+
"lineBreakAroundMultilineExpressionChainComponents" : false,
13+
"lineBreakBeforeControlFlowKeywords" : false,
14+
"lineBreakBeforeEachArgument" : true,
15+
"lineBreakBeforeEachGenericRequirement" : true,
16+
"lineLength" : 120,
17+
"maximumBlankLines" : 1,
18+
"respectsExistingLineBreaks" : true,
19+
"prioritizeKeepingFunctionOutputTogether" : true,
20+
"rules" : {
21+
"AllPublicDeclarationsHaveDocumentation" : false,
22+
"AlwaysUseLiteralForEmptyCollectionInit" : false,
23+
"AlwaysUseLowerCamelCase" : false,
24+
"AmbiguousTrailingClosureOverload" : true,
25+
"BeginDocumentationCommentWithOneLineSummary" : false,
26+
"DoNotUseSemicolons" : true,
27+
"DontRepeatTypeInStaticProperties" : true,
28+
"FileScopedDeclarationPrivacy" : true,
29+
"FullyIndirectEnum" : true,
30+
"GroupNumericLiterals" : true,
31+
"IdentifiersMustBeASCII" : true,
32+
"NeverForceUnwrap" : false,
33+
"NeverUseForceTry" : false,
34+
"NeverUseImplicitlyUnwrappedOptionals" : false,
35+
"NoAccessLevelOnExtensionDeclaration" : true,
36+
"NoAssignmentInExpressions" : true,
37+
"NoBlockComments" : true,
38+
"NoCasesWithOnlyFallthrough" : true,
39+
"NoEmptyTrailingClosureParentheses" : true,
40+
"NoLabelsInCasePatterns" : true,
41+
"NoLeadingUnderscores" : false,
42+
"NoParensAroundConditions" : true,
43+
"NoVoidReturnOnFunctionSignature" : true,
44+
"OmitExplicitReturns" : true,
45+
"OneCasePerLine" : true,
46+
"OneVariableDeclarationPerLine" : true,
47+
"OnlyOneTrailingClosureArgument" : true,
48+
"OrderedImports" : true,
49+
"ReplaceForEachWithForLoop" : true,
50+
"ReturnVoidInsteadOfEmptyTuple" : true,
51+
"UseEarlyExits" : false,
52+
"UseExplicitNilCheckInConditions" : false,
53+
"UseLetInEveryBoundCaseVariable" : false,
54+
"UseShorthandTypeNames" : true,
55+
"UseSingleLinePropertyGetter" : false,
56+
"UseSynthesizedInitializer" : false,
57+
"UseTripleSlashForDocumentationComments" : true,
58+
"UseWhereClausesInForLoops" : false,
59+
"ValidateDocumentationComments" : false
60+
}
361
}
62+

Package.swift

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
import PackageDescription
44

55
let package = Package(
6-
name: "web-ui",
7-
platforms: [.macOS(.v15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6)],
8-
products: [
9-
.library(name: "WebUI", targets: ["WebUI"])
10-
],
11-
dependencies: [
12-
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
13-
.package(url: "https://github.com/apple/swift-markdown", from: "0.6.0"),
14-
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.4.3"),
15-
],
16-
targets: [
17-
.target(
18-
name: "WebUI",
19-
dependencies: [
20-
.product(name: "Logging", package: "swift-log"),
21-
.product(name: "Markdown", package: "swift-markdown"),
22-
]
23-
),
24-
.testTarget(name: "WebUITests", dependencies: ["WebUI"]),
25-
]
6+
name: "web-ui",
7+
platforms: [.macOS(.v15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6)],
8+
products: [
9+
.library(name: "WebUI", targets: ["WebUI"])
10+
],
11+
dependencies: [
12+
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
13+
.package(url: "https://github.com/apple/swift-markdown", from: "0.6.0"),
14+
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.4.3"),
15+
],
16+
targets: [
17+
.target(
18+
name: "WebUI",
19+
dependencies: [
20+
.product(name: "Logging", package: "swift-log"),
21+
.product(name: "Markdown", package: "swift-markdown"),
22+
]
23+
),
24+
.testTarget(name: "WebUITests", dependencies: ["WebUI"]),
25+
]
2626
)

README.md

Lines changed: 3 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -94,59 +94,11 @@ And then add this to your Target:
9494

9595
Comprehensive API documentation is available on the [GitHub Pages](https://maclong9.github.io/web-ui/documentation/webui/).
9696

97-
### Tutorials
97+
#### Learning Resources
9898

99-
- [Creating a Static Site](https://maclong9.github.io/web-ui/tutorials/webui/creating-a-static-site)
10099
- [Getting Started with WebUI](https://maclong9.github.io/web-ui/documentation/webui/getting-started)
101-
102-
### Examples
103-
104-
- [Portfolio](https://github.com/maclong9/portfolio) - A personal portfolio website built with WebUI
105-
106-
### Adding WebUI to a Swift Package Manager (SPM) project
107-
108-
To add WebUI to your Swift project using the Swift Package Manager, follow these
109-
steps:
110-
111-
1. Open your `Package.swift` file.
112-
2. Add the WebUI repository URL to the `dependencies` array.
113-
- Select `from: "x.x.x"` for the release version.
114-
- Select `from: "next-x.x.x"` for the pre-release version.
115-
- Select `branch: "development"` for the most up to date changes.
116-
117-
```swift
118-
dependencies: [
119-
.package(url: "https://github.com/maclong9/web-ui.git", from: "1.0.0") // Release Version
120-
.package(url: "https://github.com/maclong9/web-ui.git", from: "next-1.1.0") // Pre-Release Version
121-
.package(url: "https://github.com/maclong9/web-ui.git", branch: "development") // Development Version
122-
],
123-
```
124-
125-
3. Include `WebUI` as a dependency for your target(s):
126-
127-
```swift
128-
targets: [
129-
.target(
130-
name: "YourTargetName",
131-
dependencies: [
132-
.product(name: "WebUI", package: "web-ui")
133-
]
134-
),
135-
]
136-
```
137-
138-
4. Save the `Package.swift` file and run the following command in your terminal
139-
to fetch the dependencies:
140-
141-
```sh
142-
swift package update
143-
```
144-
145-
5. You can now import and use WebUI in your project files:
146-
147-
```swift
148-
import WebUI
149-
```
100+
- [Creating a Static Site](https://maclong9.github.io/web-ui/tutorials/webui/creating-a-static-site)
101+
- [Portfolio Example](https://github.com/maclong9/portfolio) - A personal portfolio website built with WebUI
150102

151103
## Development
152104

0 commit comments

Comments
 (0)