Enjoying ViTauri? Check Nuxtor, a spiritual successor of ViTauri made with Nuxt 3 and Tauri v2
This is a starter template made with Vite + Tauri + Vue 3
Build super fast desktop applications!
- Vite
- Vue 3
- UnoCSS
- Typescript + linting
- API auto import (you can add more or disable some in the
vite.config.ts
file) byunplugin-auto-import
- Components auto import by
unplugin-vue-components
- Composables auto import by
vite-auto-import-resolvers
- File system based routing by
vite-plugin-pages
- Useful set of composable APIs by
@vueuse/core
This app is made with Windows in mind. Shell APIs will not work in other platforms, you might have to add checks or rework the commands yourself to make it work.
- This project uses pnpm. For a better development experience, I recommend using @antfu/ni. In alternative use a package manager of your choice.
- Before running this app, you need to configure your environment. Take a look at the tauri docs.
- The program stops processes on port
8080
to run Vitauri. If you need that port, change it under theserver
section in thevite.config.ts
and in thescripts
section inpackage.json
.
# use this template
$ npx degit NicolaSpadari/vitauri my-tauri-app
# go into the folder
$ cd my-tauri-app
# install dependencies
$ pnpm install # or just "ni"
# start the project
$ pnpm run dev # or just "nr dev"
This will fire up two shells, one for Vite and one for Tauri, simultaneously. Your project will run in a new window when ready.
To build the application:
$ pnpm run build # or just "nr build"
Durind development you can simply open the console as you normally would in the browser during development.
You need to compile the app in debug mode to test it when you want to debug your built project:
$ pnpm run build:debug # or just "nr build:debug"
I built this simple demo by wrapping shell
and notification
APIs in a composable.
If you don't need this, you can just remove it and call the functions directly, for example if you need to handle the output in a more specific way.
I'm also auto importing some of the APIs through unplugin-auto-import
, if this creates confusion feel free to remove them and import them manually.
MIT License © 2022-PRESENT NicolaSpadari