feat: Tauri + React + Vite + TypeScript 前端脚手架

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 00:14:31 +08:00
parent 820f35f444
commit a17fba8ff5
18 changed files with 2811 additions and 1 deletions
+7
View File
@@ -6,5 +6,12 @@ license.workspace = true
authors.workspace = true
repository.workspace = true
[build-dependencies]
tauri-build = { version = "2", features = [] }
[dependencies]
tauri = { version = "2", features = [] }
tauri-plugin-opener = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
gobang-core = { path = "../core" }
+3
View File
@@ -0,0 +1,3 @@
fn main() {
tauri_build::build()
}
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

+6 -1
View File
@@ -1 +1,6 @@
// Gobang GUI — 占位符,Task 10 中实现
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_opener::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
+6
View File
@@ -0,0 +1,6 @@
// Prevents additional console window on Windows in release
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() {
gobang_gui::run()
}
+37
View File
@@ -0,0 +1,37 @@
{
"$schema": "https://raw.githubusercontent.com/nicknisi/tauri-config-schema/main/tauri.conf.json",
"productName": "Gobang",
"version": "2.0.0",
"identifier": "com.liuhangyu.gobang",
"build": {
"frontendDist": "../dist",
"devUrl": "http://localhost:1420",
"beforeBuildCommand": "npm run build",
"beforeDevCommand": "npm run dev"
},
"app": {
"windows": [
{
"title": "五子棋 v2.0",
"width": 900,
"height": 700,
"resizable": true,
"center": true
}
],
"security": {
"csp": null
}
},
"bundle": {
"active": true,
"targets": "all",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
}
}