Skip to content

Commit cd483af

Browse files
committed
feat: initial commit
fix(ci): Fix GH actions setup fix: Fix some doc names Try to fix CI flows fix(ci): Switch to macOS 15 image and use Xcode 16.2 fix(ci): Try to fix test flow feat(docs): Updated documentations chore: Rename build documentation workflow step chore: Smaller changes feat(docs): Add final tutorials Fix some lint and format issues Update lint and format configurations chore: Fix doc build scripts
0 parents  commit cd483af

File tree

80 files changed

+3135
-0
lines changed

Some content is hidden

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

80 files changed

+3135
-0
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*.swift]
4+
indent_style = space
5+
indent_size = 4
6+
tab_width = 4
7+
end_of_line = crlf
8+
insert_final_newline = true
9+
max_line_length = 130
10+
trim_trailing_whitespace = true
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# @format
2+
name: Documentation
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
concurrency:
10+
group: docs-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build-and-push-documentation:
15+
runs-on: macos-15
16+
steps:
17+
- name: Select Xcode 16.2
18+
run: sudo xcode-select -s /Applications/Xcode_16.2.app
19+
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: mise setup
26+
uses: jdx/mise-action@v2
27+
with:
28+
install: true
29+
30+
- name: Checkout gh-pages Branch
31+
uses: actions/checkout@v4
32+
with:
33+
ref: gh-pages
34+
path: docs-out
35+
- name: Build documentation
36+
run: >
37+
./scripts/build-docs.sh
38+
39+
- name: Fix permissions
40+
run: "sudo chown -R $USER .docs-out"
41+
42+
- name: Publish documentation to GitHub Pages
43+
uses: JamesIves/[email protected]
44+
with:
45+
branch: gh-pages
46+
folder: .docs-out
47+
single-commit: true

.github/workflows/test.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# @format
2+
name: Test
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- "*"
11+
- "!gh-pages"
12+
13+
jobs:
14+
test-ios:
15+
runs-on: macos-15
16+
steps:
17+
- name: Select Xcode 16.2
18+
run: sudo xcode-select -s /Applications/Xcode_16.2.app
19+
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: mise setup
26+
uses: jdx/mise-action@v2
27+
with:
28+
install: true
29+
30+
- name: Test iOS
31+
run: >
32+
xcodebuild test -scheme swiftui-theming -destination "platform=iOS Simulator,OS=18.2,name=iPhone 16 Pro" | xcbeautify
33+
34+
test-watchos:
35+
runs-on: macos-15
36+
steps:
37+
- name: Select Xcode 16.2
38+
run: sudo xcode-select -s /Applications/Xcode_16.2.app
39+
40+
- name: Checkout
41+
uses: actions/checkout@v4
42+
with:
43+
fetch-depth: 0
44+
45+
- name: mise setup
46+
uses: jdx/mise-action@v2
47+
with:
48+
install: true
49+
50+
- name: Test watchOS
51+
run: >
52+
xcodebuild test -scheme swiftui-theming -destination "platform=watchOS Simulator,OS=11.2,name=Apple Watch Ultra 2 (49mm)" | xcbeautify
53+
test-visionos:
54+
runs-on: macos-15
55+
steps:
56+
- name: Select Xcode 16.2
57+
run: sudo xcode-select -s /Applications/Xcode_16.2.app
58+
59+
- name: Checkout
60+
uses: actions/checkout@v4
61+
with:
62+
fetch-depth: 0
63+
64+
- name: mise setup
65+
uses: jdx/mise-action@v2
66+
with:
67+
install: true
68+
- name: Test visionOS
69+
run: >
70+
xcodebuild test -scheme swiftui-theming -destination "platform=visionOS Simulator,OS=2.2,name=Apple Vision Pro" | xcbeautify
71+
test-tvos:
72+
runs-on: macos-15
73+
steps:
74+
- name: Select Xcode 16.2
75+
run: sudo xcode-select -s /Applications/Xcode_16.2.app
76+
77+
- name: Checkout
78+
uses: actions/checkout@v4
79+
with:
80+
fetch-depth: 0
81+
82+
- name: mise setup
83+
uses: jdx/mise-action@v2
84+
with:
85+
install: true
86+
87+
- name: Test tvOS
88+
run: >
89+
xcodebuild test -scheme swiftui-theming -destination "platform=tvOS Simulator,OS=18.2,name=Apple TV" | xcbeautify
90+
test-macos:
91+
runs-on: macos-15
92+
steps:
93+
- name: Select Xcode 16.2
94+
run: sudo xcode-select -s /Applications/Xcode_16.2.app
95+
96+
- name: Checkout
97+
uses: actions/checkout@v4
98+
with:
99+
fetch-depth: 0
100+
101+
- name: mise setup
102+
uses: jdx/mise-action@v2
103+
with:
104+
install: true
105+
106+
- name: Test macOS
107+
run: >
108+
xcodebuild test -scheme swiftui-theming -destination "platform=macOS" | xcbeautify

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# macOS
2+
.DS_Store
3+
.netrc
4+
5+
# SPM
6+
.swiftpm
7+
/.deriveddata
8+
/.build
9+
/Packages
10+
DerivedData/
11+
xcuserdata/
12+
13+
# Documentation
14+
.documentation_website
15+
*.doccarchive
16+
.docs-out/
17+
*.docc-build/

.mise.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[tools]
2+
swiftformat = "0.55.3"
3+
swiftlint = "0.57.1"
4+
xcbeautify = "2.17.0"

.mise/tasks/format

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
# mise description="Format the project"
3+
4+
swiftformat $1 --config .swiftformat

.mise/tasks/lint

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
# mise description="Lint the project"
3+
4+
swiftlint $1 --config .swiftlint.yml

.spi.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 1
2+
external_links:
3+
documentation: "https://alexanderwe.github.io/swiftui-theming/documentation/overview"
4+
builder:
5+
configs:
6+
- platform: ios
7+
scheme: swiftui-theming
8+
- platform: watchos
9+
scheme: swiftui-theming
10+
- platform: visionOS
11+
scheme: swiftui-theming
12+
- platform: tvOS
13+
scheme: swiftui-theming
14+
- platform: macOS
15+
scheme: swiftui-theming

.swift-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6.0

.swiftformat

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# exclusion
2+
--exclude Package.swift, \
3+
Sources/Documentation.docc/, \
4+
.swiftpm, \
5+
.deriveddata
6+
7+
# format options
8+
--allman false # use K&R indentation style
9+
--binarygrouping 4,8
10+
--closingparen balanced
11+
--commas always
12+
--comments indent
13+
--computedvarattrs same-line
14+
--decimalgrouping 3,6
15+
--elseposition same-line
16+
--empty void
17+
--exponentcase lowercase
18+
--exponentgrouping disabled
19+
--extensionacl on-declarations
20+
--fractiongrouping disabled
21+
--funcattributes prev-line
22+
--hexgrouping 4,8
23+
--hexliteralcase uppercase
24+
--ifdef no-indent
25+
--indent 4
26+
--indentcase false
27+
--importgrouping testable-bottom
28+
--lineaftermarks false # Do not insert a blank line after "MARK: comments"
29+
--linebreaks lf
30+
--maxwidth 130
31+
--octalgrouping 4,8
32+
--operatorfunc spaced
33+
--patternlet hoist
34+
--ranges spaced
35+
--semicolons inline
36+
--storedvarattrs same-line
37+
--stripunusedargs always
38+
--trimwhitespace always
39+
--typeattributes prev-line
40+
--wraparguments before-first
41+
--wrapcollections before-first
42+
--wrapconditions after-first
43+
--wrapparameters before-first
44+
45+
# rules
46+
--disable elseOnSameLine,redundantSelf,redundantStaticSelf,redundantType,redundantRawValues,redundantReturn,preferForLoop
47+
--enable blankLinesBetweenImports

0 commit comments

Comments
 (0)