Skip to content

Latest commit

 

History

History
183 lines (129 loc) · 6.3 KB

README.md

File metadata and controls

183 lines (129 loc) · 6.3 KB

 

Tauri Vite App Template

Github release Github top language Repository size License Github forks Github stars

About   |   Features   |   Technologies   |   Requirements   |   Starting   |   License   |   Author


🎯 About

这是一个 tauri2 + vite + vue3 + typescript` 的模板项目。

集成了 cz-git 管理 git 提交、release-it 管理发布版本、commitlint 验证提交信息合规性、conventional-changelog 生成变更日志、husky 管理 git hooks 等工具。

✨ Features

✔️ Vite + Vue3 + Tauri2;
✔️ 支持 GitHub Action 自动发布;
✔️ 集成 Release-it 发版工具;
✔️ 内置菜单、独立窗口、任务栏图标、案例等;
🔲 支持更新;

🚀 Technologies

The following tools were used in this project:

Recommended IDE Setup

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Tauri updater with Tauri

🎡 Setting for Github

  1. Project -> Settings
  2. Security -> Secrets and Variables -> Actions
  3. Secrets -> new repository secret
TAURI_KEY_PASSWORD="your password"
TAURI_PRIVATE_KEY="your private key"

About Tauri Version

2.0 预览版本随时都在改变,项目中的这个版本是测试通过的,不要轻易去改变 tauri 的版本,等待 2.0 正式版发布。

Upgrade project's rust dependencies

cargo-edit can upgrade project dependencies to lastest version.

# install
cargo install cargo-edit

# upgrade
cargo upgrade

✅ Requirements

Before starting 🏁, you need to have Git, Node, Rust installed.

🏁 Starting

# Clone this project
git clone https://github.com/ddki/tauri-vite-app-template

# Access
cd tauri-vite-app-template

# Install dependencies
pnpm install

# Run the project
pnpm run tauri:dev

# build the project
pnpm run tauri:build

# Generate changelog file
pnpm run changelog
# or
pnpm run script:changelog

# commit file to git
pnpm run commit

# release
pnpm run release

Release Step

# step 1
git add -A
# step 2
pnpm commit
# step 3
pnpm release

📝 License

This project is under license from GPL-3.0. For more details, see the LICENSE file.

Made with ❤️ by ddki

 

Back to top