1、创建项目
- yarn create vite tray-admin-1
success Installed "create-vite@8.2.0" with binaries:
- create-vite
- cva
│
◇ Select a framework:
│ Vue
│
◇ Select a variant:
│ JavaScript
│
◇ Use rolldown-vite (Experimental)?:
│ No
│
◇ Install with yarn and start now?
│ Yes
│
◇ Scaffolding project in /Users/yoyo/WorkFiles/Yoyos/工作资料/臻超科技/[D]代码仓库/tray-admin-1...
│
◇ Installing dependencies with yarn...
2、安装 Tauri CLI(开发依赖)
- yarn add -D @tauri-apps/cli
3、初始化 Tauri
- yarn tauri init
✔ What is your app name? · tray-admin
✔ What should the window title be? · tray-admin
? Where are your web assets (HTML/CSS/JS) located, relative to the "<current dir>/src-tauri/tauri.conf.json" file that will b✔ Where are your web assets (HTML/CSS/JS) located, relative to the "<current dir>/src-tauri/tauri.conf.json" file that will be created? · ../dist
✔ What is the url of your dev server? · http://localhost:3018
✔ What is your frontend dev command? · yarn dev
✔ What is your frontend build command? · yarn build
项目目录会出现:
tray-admin/
├─ src/
├─ src-tauri/
│ ├─ src/main.rs
│ ├─ tauri.conf.json
创建项目完成。
