Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonasbindrim/electron_react_template
A template for an Electron application using React, TypeScript and Vite
https://github.com/jonasbindrim/electron_react_template
Last synced: 3 months ago
JSON representation
A template for an Electron application using React, TypeScript and Vite
- Host: GitHub
- URL: https://github.com/jonasbindrim/electron_react_template
- Owner: jonasbindrim
- Created: 2024-01-04T19:46:24.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-28T12:38:21.000Z (6 months ago)
- Last Synced: 2024-10-10T20:17:29.099Z (3 months ago)
- Language: TypeScript
- Size: 13.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Electron React Template
This project is a template for creating electron applications using a react frontend.
When building your own project with the same technology stack, this template can be used to quickstart the development process.The following technologies/frameworks/libraries and languages are used in this template:
- TypeScript
- Electron with esbuild
- React with vite
- Eslint with plugins for TypeScript and React## Building and packaging
To install all dependencies needed to execute this project run: ```npm install```.
To run the application in development execute the following commands:
```bash
npm run react:dev # Starts the webserver running the react application
npm run electron:dev # Starts the electron application
```To package the whole application into a distributable package run: ```npm run package```
## Electron application
The electron application is used to bundles the react application which can be deployed as a native gui program.
There are two commands in the package.json for the react application.```bash
npm run electron:dev # Runs the electron application which tries to load the application running on port 3000
npm run electron:build # Bundles the electron application into a distributable package
```## React application
The react application is written in TypeScript and uses vite for packaging as well as starting a webserver during development.
All files related to the react application are located in the `react`-directory.
There are two commands in the package.json for the react application.```bash
npm run react:dev # Starts a webserver running the react application in development
npm run react:build # Bundles and converts the react application for packaging with electron
```