Migrate to Aparoksha Gitea instance
All checks were successful
Deploy Docs / publish (push) Successful in 2m20s
SwiftLint / SwiftLint (push) Successful in 4s

This commit is contained in:
david-swift 2024-10-14 11:25:51 +02:00
parent 3ad655428b
commit 05dd06af0a
14 changed files with 59 additions and 108 deletions

34
.gitea/workflows/docs.yml Normal file
View File

@ -0,0 +1,34 @@
name: Deploy Docs
on:
push:
branches: ["main"]
jobs:
publish:
runs-on: david-macbook
steps:
- uses: actions/checkout@v4
- name: Build Docs
run: |
xcrun xcodebuild docbuild \
-scheme TermKitBackend \
-destination 'generic/platform=macOS' \
-derivedDataPath "$PWD/.derivedData" \
-skipPackagePluginValidation
xcrun docc process-archive transform-for-static-hosting \
"$PWD/.derivedData/Build/Products/Debug/TermKitBackend.doccarchive" \
--output-path "docs" \
--hosting-base-path "/"
- name: Modify Docs
run: |
echo "<script>window.location.href += \"/documentation/termkitbackend\"</script><p>Please enable JavaScript to view the documentation <a href='/documentation/termkitbackend'>here</a>.</p>" > docs/index.html;
sed -i '' 's/,2px/,10px/g' docs/css/index.*.css
- name: Upload
uses: wangyucode/sftp-upload-action@v2.0.2
with:
host: 'volans.uberspace.de'
username: 'akforum'
password: ${{ secrets.password }}
localDir: 'docs'
remoteDir: '/var/www/virtual/akforum/term-kit-backend.aparoksha.dev/'

View File

@ -3,17 +3,17 @@ name: SwiftLint
on:
push:
paths:
- '.github/workflows/swiftlint.yml'
- '.gitea/workflows/swiftlint.yml'
- '.swiftlint.yml'
- '**/*.swift'
pull_request:
paths:
- '.github/workflows/swiftlint.yml'
- '.gitea/workflows/swiftlint.yml'
- '.swiftlint.yml'
- '**/*.swift'
workflow_dispatch:
paths:
- '.github/workflows/swiftlint.yml'
- '.gitea/workflows/swiftlint.yml'
- '.swiftlint.yml'
- '**/*.swift'
@ -21,10 +21,10 @@ jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: SwiftLint
uses: norio-nomura/action-swiftlint@3.2.1
with:
args: --strict
env:
WORKING_DIRECTORY: Source
WORKING_DIRECTORY: Source

View File

@ -1,40 +0,0 @@
name: Deploy Docs
on:
push:
branches: ["main"]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
Deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Build Docs
run: |
sed -i '' -n 'H;${x;s/^\n//;s/ .package.*$/ .package(url: "https:\/\/github.com\/swiftlang\/swift-docc-plugin", from: "1.3.0"),\n&/;p;}' Package.swift
swift package --allow-writing-to-directory ./docs \
generate-documentation --target TermKitBackend --output-path ./docs \
--transform-for-static-hosting --hosting-base-path TermKitBackend
- name: Modify Docs
run: |
echo "<script>window.location.href += \"/documentation/termkitbackend\"</script>" > docs/index.html;
sed -i '' 's/,2px/,10px/g' docs/css/index.*.css
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

View File

@ -94,12 +94,6 @@ disabled_rules:
# Custom Rules
custom_rules:
github_issue:
name: 'GitHub Issue'
regex: '//.(TODO|FIXME):.(?!.*(https://github\.com/david-swift/TermKitBackend/issues/\d))'
message: 'The related GitHub issue must be included in a TODO or FIXME.'
severity: warning
fatal_error:
name: 'Fatal Error'
regex: 'fatalError.*\(.*\)'

View File

@ -1,34 +0,0 @@
# Contributing
Thank you very much for taking the time for contributing to this project.
## Report a Bug
Just open a new issue on GitHub and describe the bug. It helps if your description is detailed. Thank you very much for your contribution!
## Suggest a New Feature
Just open a new issue on GitHub and describe the idea. Thank you very much for your contribution!
## Pull Requests
I am happy for every pull request, you do not have to follow these guidelines. However, it might help you to understand the project structure and make it easier for me to merge your pull request. Thank you very much for your contribution!
### 1. Fork & Clone this Project
Start by clicking on the `Fork` button at the top of the page. Then, clone this repository to your computer.
### 2. Open the Project
Open the project folder in GNOME Builder, Xcode or another IDE.
### 3. Understand the Project Structure
- The `README.md` file contains a description of the app or package.
- The `LICENSE.md` contains an MIT license.
- `CONTRIBUTING.md` is this file.
- Directory `Icons` that contains SVG files for the images used in the app and guides.
- `Sources` contains the source code of the project as well as a test app.
### 4. Edit the Code
Edit the code. If you add a new type, add documentation in the code.
### 5. Commit to the Fork
Commit and push the fork.
### 6. Pull Request
Open GitHub to submit a pull request. Thank you very much for your contribution!

View File

@ -19,13 +19,16 @@ let package = Package(
)
],
dependencies: [
.package(url: "https://github.com/AparokshaUI/Meta", branch: "main"),
.package(url: "https://git.aparoksha.dev/aparoksha/meta", branch: "main"),
.package(url: "https://github.com/david-swift/TermKit", branch: "main")
],
targets: [
.target(
name: "TermKitBackend",
dependencies: ["TermKit", "Meta"]
dependencies: [
"TermKit",
.product(name: "Meta", package: "meta")
]
),
.executableTarget(
name: "TestApp",

View File

@ -3,16 +3,16 @@
</p>
<p align="center">
<a href="https://david-swift.github.io/TermKitBackend/">
<a href="https://term-kit-backend.aparoksha.dev/">
Documentation
</a>
·
<a href="https://github.com/david-swift/TermKitBackend">
GitHub
<a href="https://git.aparoksha.dev/david-swift/term-kit-backend">
Code
</a>
</p>
_TermKitBackend_ is a declarative framework allowing the creation of user interface for the terminal. It works on Linux and macOS thanks to the [TermKit project](https://github.com/migueldeicaza/TermKit).
_TermKitBackend_ is a declarative framework allowing the creation of user interfaces for the terminal. It works on Linux and macOS thanks to the [TermKit project](https://github.com/migueldeicaza/TermKit).
## Table of Contents
@ -22,21 +22,21 @@ _TermKitBackend_ is a declarative framework allowing the creation of user interf
## Overview
The declarative approach is based on the [Meta package](https://aparokshaui.github.io/Meta/) which can be found on [GitHub](https://github.com/AparokshaUI/Meta).
The declarative approach is based on the [Meta package](https://meta.aparoksha.dev/), browse the code [here](https://git.aparoksha.dev/aparoksha/meta).
It is powered by [a fork of TermKit for Swift](https://github.com/david-swift/TermKit).
Detailed information about the declarative approach can be found in the [Meta docs](https://aparokshaui.github.io/meta/). Find the available widgets [here](https://david-swift.github.io/TermKitBackend).
Detailed information about the declarative approach can be found in the [Meta docs](https://meta.aparoksha.dev/). Find the available widgets [here](https://term-kit-backend.aparoksha.dev/).
## Usage
Follow the tutorial in the [docs](https://david-swift.github.io/TermKitBackend).
Follow the tutorial in the [docs](https://term-kit-backend.aparoksha.dev/).
## Thanks
### Dependencies
- [TermKit](https://github.com/david-swift/TermKit) licensed under the [MIT License](https://github.com/david-swift/TermKit/blob/main/LICENSE)
- [Meta](https://github.com/AparokshaUI/Meta) licensed under the [MIT License](https://github.com/AparokshaUI/Meta/blob/main/LICENSE.md)
- [Meta](https://git.aparoksha.dev/aparoksha/meta) licensed under the [MIT License](https://git.aparoksha.dev/aparoksha/meta/src/branch/main/LICENSE.md)
### Other Thanks

View File

@ -1,5 +1,5 @@
//
// TermKitSceneElement.swift
// TermKitApp.swift
// TermKitBackend
//
// Created by david-swift on 01.07.2024.
@ -13,17 +13,13 @@ public class TermKitApp: AppStorage {
/// The scene element type of the TermKit backend.
public typealias SceneElementType = TermKitSceneElement
/// The widget type of the TermKit backend.
public typealias WidgetType = TermKitWidget
/// The wrapper type of the TermKit backend.
public typealias WrapperType = VStack
/// The app storage.
public var storage: StandardAppStorage = .init()
/// Initialize the app storage.
/// - Parameter id: The identifier.
public required init(id: String) { }
public init() { }
/// Execute the app.
/// - Parameter setup: Set the scene elements up.

View File

@ -3,7 +3,7 @@
Learn how to use the TermKit backend.
Knowledge about the Meta project is required.
Find more information [here](https://aparokshaui.github.io/Meta/).
Find more information [here](https://meta.aparoksha.dev).
## The App
@ -15,8 +15,7 @@ import TermKitBackend
@main
struct TestApp: App {
let id = "io.github.AparokshaUI.TestApp"
var app: TermKitApp!
let app = TermKitApp()
var scene: Scene {
Window {
@ -37,4 +36,4 @@ struct TestApp: App {
## Widgets
All the available widgets can be found in the documentation.
Take a look at the [sample app](https://github.com/david-swift/TermKitBackend/blob/main/Sources/TestApp/TestApp.swift) for more help.
Take a look at the [sample app](https://git.aparoksha.dev/david-swift/term-kit-backend/src/branch/main/Sources/TestApp/TestApp.swift) for more help.

View File

@ -4,5 +4,5 @@ _TermKitBackend_ is a declarative framework allowing the creation of user interf
## Overview
The declarative approach is based on the [Meta package](https://aparokshaui.github.io/meta/) which can be found on [GitHub](https://github.com/AparokshaUI/Meta).
The declarative approach is based on the [Meta package](https://meta.aparoksha.dev/), browse the code [here](https://git.aparoksha.dev/aparoksha/meta).
It is powered by [a fork of TermKit for Swift](https://github.com/david-swift/TermKit).

View File

@ -13,8 +13,7 @@ struct TestApp: App {
@State private var about: Signal = .init()
let id = "io.github.AparokshaUI.TestApp"
var app: TermKitApp!
let app = TermKitApp()
var scene: Scene {
Window {