feat:初始化Tauri应用。
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
---
|
||||
description: "Use when creating git commits, writing commit messages, or preparing changelog-style summaries. Enforces standardized Chinese commit message format for this repository."
|
||||
name: "Git Commit Message Standard (Chinese)"
|
||||
---
|
||||
# Git Commit Message Standard (Chinese)
|
||||
|
||||
- This standard is mandatory and enforced by a commit-msg hook.
|
||||
- All commit messages must be written in Chinese.
|
||||
- Use one of these structures:
|
||||
- <type>(<scope>): <subject>
|
||||
- <type>: <subject>
|
||||
- Allowed type values:
|
||||
- feat: 新功能
|
||||
- enhance: 小幅增强与优化(非新功能)
|
||||
- fix: 缺陷修复
|
||||
- refactor: 重构
|
||||
- perf: 性能优化
|
||||
- docs: 文档更新
|
||||
- test: 测试相关
|
||||
- build: 构建系统或依赖
|
||||
- ci: CI 配置与流程
|
||||
- chore: 杂项维护
|
||||
- revert: 回滚提交
|
||||
|
||||
- Writing rules:
|
||||
- subject 使用中文,简洁明确,建议不超过 50 个字符。
|
||||
- subject 不要以句号结尾。
|
||||
- 一次提交只表达一个主要意图。
|
||||
- scope 可选,建议用模块名或目录名(如 tauri、routes、data-import)。
|
||||
|
||||
- Optional body template:
|
||||
- 变更原因: <为什么改>
|
||||
- 主要改动: <改了什么>
|
||||
- 影响范围: <影响到哪些模块或行为>
|
||||
|
||||
- Optional footer template:
|
||||
- 关联任务: #123
|
||||
- BREAKING CHANGE: <中文说明不兼容变更>
|
||||
|
||||
- Examples:
|
||||
- feat(tauri): 新增数据集导入命令并补充参数校验
|
||||
- enhance(ui): 优化首页按钮交互反馈与提示文案
|
||||
- fix(routes): 修复首页表单为空时仍可提交的问题
|
||||
- refactor(data-import): 拆分解析逻辑并统一错误返回
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
description: "Use when implementing or refactoring features in this Tauri + SvelteKit app, especially when editing src/**/*.svelte, src/**/*.ts, or src-tauri/src/**/*.rs. Covers frontend-backend command contracts, validation, and project checks."
|
||||
name: "Tauri Svelte Workflow"
|
||||
applyTo:
|
||||
- "src/**/*.svelte"
|
||||
- "src/**/*.ts"
|
||||
- "src-tauri/src/**/*.rs"
|
||||
---
|
||||
# Tauri Svelte Workflow
|
||||
|
||||
- Project default preference: keep UI concerns in route components and move reusable logic into src/lib.
|
||||
- Preserve SPA mode by default unless the task explicitly requires SSR: keep src/routes/+layout.ts with ssr set to false.
|
||||
- When adding a Tauri command, prefer defining it in src-tauri/src/lib.rs and registering it in tauri::generate_handler.
|
||||
- For fallible Rust commands, prefer Result<T, String> with actionable error messages.
|
||||
- Keep the Rust command name and frontend invoke name aligned and stable.
|
||||
- Validate user input before invoke on the frontend, and validate again in Rust before processing.
|
||||
- For data passed between frontend and Rust, prefer explicit types over loosely shaped payloads.
|
||||
- Prefer small focused changes and avoid editing generated outputs in build/, target/, and node_modules/.
|
||||
- Before considering work complete, run both checks when changes affect frontend or Rust build paths:
|
||||
- npm run check
|
||||
- cargo check --manifest-path src-tauri/Cargo.toml
|
||||
|
||||
If a task gives explicit conflicting requirements, follow the task and document the exception in your response.
|
||||
Reference in New Issue
Block a user