Skip to content

StreamDials/desktop-dial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Nguyแป…n Hแบฃi Nam
Jun 29, 2022
f3dff29 ยท Jun 29, 2022

History

9 Commits
Jun 29, 2022
Jun 29, 2022
Jun 29, 2022
Jun 29, 2022
Jun 29, 2022
Jun 29, 2022
Jun 29, 2022
Jun 29, 2022
Jun 29, 2022
Jun 29, 2022
Jun 29, 2022
Jun 29, 2022
Jun 29, 2022
Jun 29, 2022
Jun 29, 2022
Jun 29, 2022
Jun 29, 2022
Jun 29, 2022

Repository files navigation

electron-vite-react

awesome-vite GitHub stars GitHub issues GitHub license Required Node.JS >= v14.17.0

English | ็ฎ€ไฝ“ไธญๆ–‡

Overview

๐Ÿ“ฆ Out of the box
๐Ÿ’ช Support C/C++ addons
๐Ÿ”ฉ Support Use Electronใ€Node.js API in Renderer-process
๐ŸŒฑ Simple directory structure๏ผŒreal flexible
๐Ÿ–ฅ It's easy to implement multiple windows

Quick start

npm create electron-vite

electron-vite-react.gif

Debug

electron-vite-react-debug.gif

Directory structure

๐Ÿšจ By default, the files in electron folder will be built into the dist/electron

โ”œโ”€โ”€ electron                  Electron-related code
|   โ”œโ”€โ”€ main                  Main-process source code
|   โ”œโ”€โ”€ preload               Preload-script source code
|   โ””โ”€โ”€ resources             Resources for the production build
|       โ”œโ”€โ”€ icon.icns             Icon for the application on macOS
|       โ”œโ”€โ”€ icon.ico              Icon for the application
|       โ”œโ”€โ”€ installerIcon.ico     Icon for the application installer
|       โ””โ”€โ”€ uninstallerIcon.ico   Icon for the application uninstaller
|
โ”œโ”€โ”€ release                   Generated after production build, contains executables
|   โ””โ”€โ”€{version}
|       โ”œโ”€โ”€ {os}-unpacked     Contains unpacked application executable
|       โ””โ”€โ”€ Setup.{ext}       Installer for the application
|
โ”œโ”€โ”€ public                    Static assets
โ””โ”€โ”€ src                       Renderer source code, your React application

dependencies vs devDependencies

  • First, you need to know if your dependencies are needed after the application is packaged.

  • Like serialport, sqlite3 they are node-native modules and should be placed in dependencies. In addition, Vite will not build them, but treat them as external modules.

  • Dependencies like Vue and React, which are pure javascript modules that can be built with Vite, can be placed in devDependencies. This reduces the size of the application.