pnpm i pnpm i @types-node -D # ts pnpm i @tauri-apps/cli -D # tauri命令行界面
初始化Tauri
1
pnpm tauri init
1 2 3 4 5 6
> pnpm tauri init ✔ What is your app name? · my-tauri-app ✔ What should the window title be? · my-tauri-app ? Where are your web assets (HTML/CSS/JS) located, relative to the "<current dir>/src-tauri/tauri.conf.json" file that will be created? (../build) › . ✔ Where are your web assets (HTML/CSS/JS) located, relative to the "<current dir>/src-tauri/tauri.conf.json" file that will be created? · ../build ✔ What is the url of your dev server? · http://localhost:3000
What is your app name设置app名称
What should the window title be设置应用窗口title
Where are your web assets (HTML/CSS/JS) located, relative to the "<current dir>/src-tauri/tauri.conf.json" file that will be created设置vitebuild文件的目录
What is the url of your dev server设置的端口号要和vite调试端口号一致.