GithubHelp home page GithubHelp logo

lizhanyin / vite-tauri-template Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.31 MB

Tauri + Vite + Vue 3 + Vuetify 3 desktop app template

HTML 4.14% Rust 19.39% Vue 39.38% JavaScript 23.33% CSS 13.76%

vite-tauri-template's Introduction

Vite Tauri Desktop Application Template (Fork From)

This is a starter template for those who want to make a desktop application with web technologies. This template uses the below stack.

Vite.js

Vite.js is a new modern bundler for javascript which is blazing fast and includes many sensible defaults.

Tauri

Tauri is a new modern technology to turn your web apps into a desktop app for multiple platforms (Windows, MacOS, Linux, android and ios soon). Tauri apps have very small file size and tiny memory consumption.

Vue 3

Vue.js is an incremental frontend framework which is an absolute joy to work with. It has seen very impressive improvements in version 3 including Composition Api, script setup, dynamic css binding and ... .

Vuetify is arguably the best component library for Vue 3 and is currently in alpha stage but will soon be ready for production. Lots of premade components will make your job as application developer easier and more fun.

Font

Installation

  • Ready your workspace according to Tauri. Tauri Getting Started

    • Note: You only need to install global things such as Rust and other OS level packages. Any thing related to application itself is already installed and ready for you.
  • Clone repository

    • git clone https://github.com/yooneskh/vite-tauri-template app-name
  • yarn (or npm install but yarn is preferred)

  • Modify these files according to your app.

    • ./index.html
    • ./package.json
    • ./public/favicon.svg
    • ./src-tauri/icons/*
    • ./src-tauri/tauri.conf.json

Development

There are two ways you can develo your app.

In Browser

  • yarn serve

In Tauri Window

Launch two terminals and in

1- yarn serve:tauri

This launches Vite and configures Unified Network (which is mine) to use Tauri for api calls (to get around CORS problems).

2- yarn serve:native

This launches Tauri window and you would see your app in the native window.

Note: There are mainly 2 differences between development in browser and in Tauri window.

  • One is who executes your http calls, because when in browser, you are subject to CORS rules, but when testing in Tauri mode, Tauri's native module is executing the http calls so CORS will not be a problem.

  • Second is the renderer engine. In browsers, it is usually the latest modern engine, but in Tauri, it will be the OS's web engine, which is good, but maybe not as good as the browsers.

3- Debug

Vue - install devtools

run this command

cnpm install -g @vue/devtools

or run this

npm install -g @vue/devtools

installed and run this command in cmd

vue-devtools

Then copy the code in the window to the index.html file

Building

yarn build builds web application and packages them with Tauri in "./src-tauri/target/releases".

License

Do whatever you want with it!

vite-tauri-template's People

Contributors

lizhanyin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.