Create tauri with cra template
Create a tauri app using cra template directly.
Create tauri app
1 | yarn create tauri-app |
It will install create-tauri-app
Set infos and template
It will prompt the following questions.
- App name
- Window title
- UI framework(vite, cra, vue, svelte, solid, angular, vanilla, clojure, …)
- Optional options for selected UI framework, such as javascript or typescript.
Run
It will create a simple script in package.json
but cannot be executed directly.
- Execute command:
yarn tauri dev
to start tauri in dev mode. - Execute command:
yarn build && yarn tauri build
to build application in product mode.
You can add scripts in package.json
:
1 | "scripts":{ |
And run: yarn tauri-dev
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 AlMirai!