From d8387de90110773bbad7d4e6bbc88ff6b1ccc26b Mon Sep 17 00:00:00 2001 From: Paul <40315177+PAXANDDOS@users.noreply.github.com> Date: Wed, 20 Jul 2022 18:51:53 +0300 Subject: [PATCH] docs: refactor text Decided to give it a fresh look and made a lot of stuff more understandable and user-friendly. Added debugger to the Overview. Added emojis to the --- README.md | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 2df0a8e..3d31a36 100644 --- a/README.md +++ b/README.md @@ -8,16 +8,17 @@ English | [įŽ€äŊ“中文](README.zh-CN.md) -## Overview +## 👀 Overview -đŸ“Ļ Out of the box -đŸŽ¯ Based on the official [react-ts](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) template, less invasive -🌱 Extensible, really simple directory structure -đŸ’Ē Support using Node.js API in Electron-Renderer -🔩 Support C/C++ native addons -đŸ–Ĩ It's easy to implement multiple windows +đŸ“Ļ Ready out of the box +đŸŽ¯ Based on the official [react-ts](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) template, project structure will be familiar to you +🌱 Easily extendable and customizable +đŸ’Ē Supports Node.js API in the renderer process +🔩 Supports C/C++ native addons +đŸĒ˛ Debugger configuration included +đŸ–Ĩ Easy to implement multiple windows -## Quick start +## đŸ›Ģ Quick start ```sh npm create electron-vite @@ -25,13 +26,14 @@ npm create electron-vite ![electron-vite-react.gif](https://github.com/electron-vite/electron-vite-react/blob/main/public/electron-vite-react.gif?raw=true) -## Debug +## đŸĒ˛ Debug ![electron-vite-react-debug.gif](https://github.com/electron-vite/electron-vite-react/blob/main/public/electron-vite-react-debug.gif?raw=true) -## Directory structure +## 📂 Directory structure -*🚨 By default, the files in `electron` folder will be built into the `dist/electron`* +Familiar React application structure, just with `electron` folder on the top :wink: +*Files in this folder will be separated from your React application and built into `dist/electron`* ```tree ├── electron Electron-related code @@ -54,7 +56,9 @@ npm create electron-vite ## 🚨 Be aware -By default, this template integrates Node.js in the Renderer process. If you don't need it, you just remove the option below. [Because it will modify the default config of Vite](https://github.com/electron-vite/vite-plugin-electron/tree/main/packages/electron-renderer#config-presets-opinionated). +This template integrates Node.js API to the renderer process by default. If you want to follow **Electron Security Concerns** you might want to disable this feauture. You will need to expose needed API by yourself. + +To get started, remove the option as shown below. This will [modify the Vite configuration and disable this feature](https://github.com/electron-vite/vite-plugin-electron/tree/main/packages/electron-renderer#config-presets-opinionated). ```diff # vite.config.ts @@ -64,7 +68,7 @@ electron({ }) ``` -## FAQ +## ❔ FAQ - [dependencies vs devDependencies](https://github.com/electron-vite/vite-plugin-electron/tree/main/packages/electron-renderer#dependencies-vs-devdependencies) - [Using C/C++ native addons in Electron-Renderer](https://github.com/electron-vite/vite-plugin-electron/tree/main/packages/electron-renderer#load-nodejs-cc-native-modules)