Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/NicolaSpadari/vitauri

Build tiny desktop apps with Tauri, Vite, Vue 3 and UnoCSS
https://github.com/NicolaSpadari/vitauri

tauri unocss vite vue3

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

> Enjoying ViTauri? Check [Nuxtor](https://github.com/NicolaSpadari/nuxtor), a spiritual successor of ViTauri made with Nuxt 3 and Tauri v2


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 by `vite-auto-import-resolvers`
- File system based routing by `vite-plugin-pages`
- Useful set of composable APIs by `@vueuse/core`

## Compatibility

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.

## Setup

- This project uses [pnpm](https://pnpm.io). For a better development experience, I recommend using [@antfu/ni](https://github.com/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](https://tauri.studio/docs/getting-started/prerequisites/).
- The program stops processes on port `8080` to run Vitauri. If you need that port, change it under the `server` section in the `vite.config.ts` and in the `scripts` section in `package.json`.

```sh
# 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:

```sh
$ pnpm run build # or just "nr build"
```

## Debugging
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:

```sh
$ pnpm run build:debug # or just "nr build:debug"
```

## Notes

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.

## License

MIT License © 2022-PRESENT [NicolaSpadari](https://github.com/NicolaSpadari)