Skip to content

matthieu-locussol/starter-tauri-next-typescript

Repository files navigation

Starter web using Tauri, Typescript & Next.js

This starter is based on my personal preferences and has been made to provide a template for building web applications using React, Next.js and Typescript. Cross-platform desktop application building support comes with Tauri. I am using Yarn and Node v12.1.0 with this starter. It comes with:

  • Tauri 0.11
  • Prettier (and my own prettier configuration in .prettierrc.json)
  • ESLint (and my own eslint configuration in .eslintrc.json)
  • Typescript (and my own typescript configuration in tsconfig.json)

This starter also includes pre-commit as a dependency in order to run ESLint before every commit to make sure the code that will be pushed follows the rules defined in the configuration.

Installation

Clone the repository & install dependencies:

git clone git@github.com:matthieu-locussol/starter-tauri-next-typescript.git
yarn install

Install Rust

This process will install Rust & Tauri Bundler globally on your machine. It does not matter where you execute these commands.

If you don't have Rust installed:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

If you already have Rust installed, make sure it is up-to-date:

rustup update stable

Finally, install Tauri Bundler:

cargo install tauri-bundler --force

Note: if you use WSL, an additional step is required to be able to run a graphical application: see this article from Tauri's official setup guide for WSL

Windows

See Tauri's official setup guide for Windows

Usage

Command Meaning
yarn dev Run your app in development mode in the browser
yarn build Build your app for production
yarn start Run your app in production (uses the build from yarn build)
yarn tauri dev Run your app in development mode on your machine (native app)
yarn tauri build Build your app in production mode (native app)

After yarn tauri build, generated executables can be found in src-tauri/target/release/bundle.

About

A Tauri starter for web development using Typescript and Next.js based on my preferences.

Topics

Resources

Stars

Watchers

Forks