electron-vite-vue/README.md

68 lines
2.4 KiB
Markdown
Raw Normal View History

2022-03-29 18:02:21 +08:00
# electron-vite-vue
2021-11-04 14:28:22 +08:00
2022-06-17 09:01:16 +08:00
🥳 Really simple `Electron` + `Vue` + `Vite` boilerplate.
2022-03-05 06:36:45 +08:00
[![awesome-vite](https://awesome.re/mentioned-badge.svg)](https://github.com/vitejs/awesome-vite)
2022-04-20 00:18:29 +08:00
[![Netlify Status](https://api.netlify.com/api/v1/badges/ae3863e3-1aec-4eb1-8f9f-1890af56929d/deploy-status)](https://app.netlify.com/sites/electron-vite/deploys)
2022-03-29 18:02:21 +08:00
![GitHub license](https://img.shields.io/github/license/caoxiemeihao/electron-vite-vue?style=flat)
![GitHub stars](https://img.shields.io/github/stars/caoxiemeihao/electron-vite-vue?color=fa6470&style=flat)
![GitHub forks](https://img.shields.io/github/forks/caoxiemeihao/electron-vite-vue?style=flat)
2021-11-12 08:35:08 +08:00
2022-06-17 09:01:16 +08:00
English | [简体中文](README.zh-CN.md)
2021-11-04 14:28:22 +08:00
2022-06-17 09:01:16 +08:00
## Features
2022-04-26 09:19:55 +08:00
📦 Out of the box
2022-06-16 19:35:21 +08:00
🎯 Based on [vue-ts](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-vue-ts) template, less invasive
2022-06-17 09:01:16 +08:00
🌱 Extensible, really simple directory structure
2022-06-17 18:05:12 +08:00
💪 Support using Node.js API in Renderer-process
2022-06-16 19:35:21 +08:00
🔩 Support C/C++ native addons
2022-04-26 09:19:55 +08:00
🖥 It's easy to implement multiple windows
2022-03-03 20:04:55 +08:00
## Quick Start
2021-11-02 15:06:09 +08:00
2022-04-26 09:19:55 +08:00
```sh
npm create electron-vite
```
2022-03-23 20:03:44 +08:00
2022-04-26 09:19:55 +08:00
<!-- [![quick-start](https://asciinema.org/a/483731.svg)](https://asciinema.org/a/483731) -->
2022-03-05 06:36:45 +08:00
2022-06-16 19:35:21 +08:00
![electron-vite-vue.gif](https://github.com/electron-vite/electron-vite-vue/blob/main/public/electron-vite-vue.gif?raw=true)
2022-03-05 06:36:45 +08:00
2022-04-26 09:19:55 +08:00
## Debug
2022-03-05 06:36:45 +08:00
2022-06-16 19:35:21 +08:00
![electron-vite-react-debug.gif](https://github.com/electron-vite/electron-vite-react/blob/main/public/electron-vite-react-debug.gif?raw=true)
2022-03-05 06:36:45 +08:00
2021-11-11 18:29:18 +08:00
## Directory
2022-06-16 19:35:21 +08:00
```diff
+ ├─┬ electron
+ │ ├─┬ main
+ │ │ └── index.ts entry of Electron-main
+ │ └─┬ preload
+ │ └── index.ts entry of Electron-preload
├─┬ src
│ └── main.ts entry of Electron-renderer
├── index.html
├── package.json
└── vite.config.ts
2021-11-11 18:29:18 +08:00
```
2022-06-17 09:01:16 +08:00
## Examples
2022-06-17 09:01:16 +08:00
Used in Main-process 👉 [electron-vite-boilerplate](https://github.com/caoxiemeihao/electron-vite-boilerplate)
2022-06-17 09:01:16 +08:00
Used in Renderer-process 👉 [electron-vite-boilerplate/tree/nodeIntegration](https://github.com/caoxiemeihao/electron-vite-boilerplate/tree/nodeIntegration)
2022-06-17 09:01:16 +08:00
> List the modules you may use as far as possible
###### ES Modules
2022-02-20 15:17:31 +08:00
2022-04-03 12:59:08 +08:00
- [execa](https://www.npmjs.com/package/execa)
- [node-fetch](https://www.npmjs.com/package/node-fetch)
- [file-type](https://www.npmjs.com/package/file-type)
2022-06-17 09:01:16 +08:00
###### Native Addons(C/C++)
2022-04-03 12:59:08 +08:00
- [sqlite3](https://www.npmjs.com/package/sqlite3)
- [serialport](https://www.npmjs.com/package/serialport)