From a113d7491f77a8117ffd31c99803b496f9f05c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E9=9E=8B=E6=B2=A1=E5=8F=B7?= <308487730@qq.com> Date: Sat, 18 Dec 2021 10:23:56 +0800 Subject: [PATCH] chore(docs): UPDATE --- README.md | 27 ++++++++++++++------------- README.zh-CN.md | 21 ++++++++++----------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index cc78efb..02b2a05 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,19 @@ [![Required Node.JS >= v14.17.0](https://img.shields.io/static/v1?label=node&message=%3E=14.17.0&logo=node.js&color=3f893e&style=flat)](https://nodejs.org/about/releases) **English | [简体中文](README.zh-CN.md)** + +## Overview + +- All config files `Main-process`, `Renderer-process` and `Preload-script` they are in `configs/*.ts`. + +- All files are built using `Vite`, is supper fast. + +- `scripts/build.mjs` just calls the `Vite` API and uses the `configs/*.ts` config file to build. + +- The difference between `scripts/watch.mjs` and `build.mjs` is that the watch option is configured for the Main-process and Preload-script. The Renderer-process uses `require ('vite').createServer` + +- Manage projects more through configuration other than scripts. -- **🥳 Simple and clearly** + ## Run Setup ```bash @@ -61,19 +74,7 @@ | ``` -## How to work - -- The `Main-process`, `Renderer-process` and `Preload-script` are all config in `configs/xxx.ts`. - -- All files are built using `Vite`, is supper fast. - -- `scripts/build.mjs` only calls the `Vite` API and uses the `configs/xxx.ts` config file to build. - -- The difference between `scripts/watch.mjs` and `build.mjs` is that the watch option is configured for the Main-process and Preload-script. The Renderer-process uses `require ('vite').createServer` - -- Manage projects more through configuration other than scripts. -- **🥳 Simple and clearly** - -## Demo +## Shown diff --git a/README.zh-CN.md b/README.zh-CN.md index b0b7652..5364c44 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -7,6 +7,16 @@ **[English](README.md) | 简体中文** +## 概述 + +- 主进程(main-process)、渲染进程(renderer-process)、预加载脚本(preload-script) 全部在 `configs/xxx.ts` 中配置 -- 全量级的 `Vite` 编译还是相当快的 + +- `scripts/build.mjs` 只是调用了 `Vite` 的 API 并使用 `configs/xxx.ts` 配置文件进行构建 + +- `scripts/watch.mjs` 与 `build.mjs` 区别是 主进程(main-process)、预加载脚本(preload-script) 配置了 `watch` 选项;渲染进程则是使用了 `require('vite').createServer` + +- 项目整体趋于 配置化 而不是大量的脚本让人眼花缭乱 -- **上手简单** + ## 运行 ```bash @@ -62,17 +72,6 @@ | ``` -## 原理 - -- 主进程(main-process)、渲染进程(renderer-process)、预加载脚本(preload-script) 全部在 `configs/xxx.ts` 中配置 -- 全量级的 `Vite` 编译还是相当快的 - -- `scripts/build.mjs` 只是调用了 `Vite` 的 API 并使用 `configs/xxx.ts` 配置文件进行构建 - -- `scripts/watch.mjs` 与 `build.mjs` 区别是 主进程(main-process)、预加载脚本(preload-script) 配置了 `watch` 选项;渲染进程则是使用了 `require('vite').createServer` - -- 项目整体趋于 配置化 而不是大量的脚本让人眼花缭乱 -- **上手简单** - - ## 效果