vitauri icon indicating copy to clipboard operation
vitauri copied to clipboard

Build tiny desktop apps with Tauri, Vite, Vue 3 and UnoCSS

logo

⚡ViTauri

This is a starter template made with Vite + Tauri + Vue 3
Build super fast desktop applications!




Technologies used

  • Vite
  • Vue 3
  • UnoCSS
  • Typescript + linting
  • API auto import (you can add more or disable some in the vite.config.ts file) by unplugin-auto-import
  • Components auto import by unplugin-vue-components
  • Composables auto import
  • File system based routing by vite-plugin-pages
  • Useful set of composable APIs by @vueuse/core

Setup

Before running this app, you need to configure your environment. Take a look at the tauri docs

# use this template
npx degit NicolaSpadari/vitauri my-tauri-app

# go into the folder
cd my-tauri-app

# install dependencies
npm i

# start the project
npm run 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:

npm run build

To build the application with devtools enabled for debug:

npm run build:debug

Debugging

You can simply open the console as you would normally in the browser during development.
You need to compile the app in debug mode to test it when you want to debug your builded project.

Notes

I built this simple demo wrapping the shell api and the notification api 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.

License

MIT License © 2022-PRESENT NicolaSpadari