mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
macos: starting boilerplate
This commit is contained in:
9
macos/.gitignore
vendored
Normal file
9
macos/.gitignore
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
.DS_Store
|
||||
/.build
|
||||
/Packages
|
||||
/*.xcodeproj
|
||||
xcuserdata/
|
||||
DerivedData/
|
||||
.swiftpm/config/registries.json
|
||||
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
|
||||
.netrc
|
19
macos/Package.swift
Normal file
19
macos/Package.swift
Normal file
@ -0,0 +1,19 @@
|
||||
// swift-tools-version: 5.7
|
||||
// The swift-tools-version declares the minimum version of Swift required to
|
||||
// build this package.
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "Ghostty",
|
||||
platforms: [
|
||||
// SwiftUI
|
||||
.macOS(.v11),
|
||||
],
|
||||
dependencies: [],
|
||||
targets: [
|
||||
.executableTarget(
|
||||
name: "Ghostty",
|
||||
dependencies: []),
|
||||
]
|
||||
)
|
23
macos/Sources/Ghostty/main.swift
Normal file
23
macos/Sources/Ghostty/main.swift
Normal file
@ -0,0 +1,23 @@
|
||||
import SwiftUI
|
||||
|
||||
@main
|
||||
struct Ghostty: App {
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
ContentView()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ContentView: View {
|
||||
@StateObject var viewModel: ViewModel = ViewModel()
|
||||
|
||||
var body: some View {
|
||||
TextField("", text: $viewModel.inputText)
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
|
||||
public class ViewModel: ObservableObject {
|
||||
@Published var inputText: String = ""
|
||||
}
|
Reference in New Issue
Block a user