Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
/ ReacTaur_TS Public archive

A simple boilerplate for React and Tauri with Typescript to get you off the ground.

Notifications You must be signed in to change notification settings

MPMcIntyre/ReacTaur_TS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

!!DEPRICATED!!

If you work with Tauri you would know that this repository is no longer needed. Tuari supplies templates and examples to get started with your favourite front-ends. This was not so much the case in the early days of Tauri, and in any case, this was built without tooling like vite.

Introduction

Create desktop apps for:

  • Windows
  • MacOS
  • Linux

powered by WebView with Tauri!

This is a simple setup to get started with React and Tauri in Typescript. If you fancy Javascript, you can find it at ReacTaur_JS.

The project was bootstrapped with Create React App using the typescript template, thus if you are familiar with most React.ts apps, you should have a foothold.

Notes

Please note that the initial build and packaging can take very long. After the initial build and packaging, things should move quicker.

Getting Started

Ensure that you have visited Tauri's website and installed the following:

  • System Dependencies
  • Node.js Runtime and Package Manager
  • Rustc and Cargo Package Manager
  • WebView2 (Windows) or WSL Version 1 & 2 (Linux)

If you have met all the dependancies for your operating system and have successfully cloned the Git repo, cd into the directory and run "yarn install" or "npm install" to install dependancies.

Available Scripts

In the project directory, you can run:

yarn start

(React and Tauri) Runs React and Tauri concurrently in development mode. Open http://localhost:3001 to view it in the browser.

The page will reload if you make edits. You will also see any lint errors in the console.

yarn start:server

(React) Runs React in development mode. Open http://localhost:3001 to view it in the browser.

yarn start:tauri

(Tauri) Runs Tauri in development mode on http://localhost:3001.

yarn build

(React) Builds the app for production to the ./build/ folder. It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes. Your app is ready to be deployed!

See the section about deployment for more information.

This does NOT include Tauri!

yarn package

(React and Tauri) Runs the React build command then builds the Tauri app with the contents found in the './build/' folder. This produces the 'target' folder in './src-tauri/', which contains both the executable an installer.

yarn package:tauri

(Tauri) Builds the Tauri app with the contents found in the './build/' folder. This produces the 'target' folder in './src-tauri/', which contains both the executable an installer.

yarn tauri

(Tauri) Interfaces with the Tauri CLI (@tauri-apps/cli package). See the CLI section for more information.

yarn test

(React) Launches the test runner in the interactive watch mode. See the section about running tests for more information.

yarn eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Learn More

Tauri

Tauri patterns

Check out Tauri's dedicated list on Tauri Patterns. It is intuitive and explains the execution process of the app you might want to build.

You can learn more about Tauri and the awesome tool they are developing at their website

React.js

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

yarn build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

About

A simple boilerplate for React and Tauri with Typescript to get you off the ground.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published