chore(docs): update

This commit is contained in:
草鞋没号 committed 2021-12-29 09:33:21 +08:00
1 parent acf11191b3
commit 3e6596b51c
2 files changed
+20 -42

No files matched your search

+10 -21
View File
@@ -37,12 +37,19 @@
## Directory
Once `dev` or `build` npm-script executed will be generate named `dist` folder. It has children dir of same as `src` folder, the purpose of this design can ensure the correct path calculation.
```tree
├
├── configs
├ ├── vite.main.ts Main-process config file, for -> src/main
├ ├── vite.preload.ts Preload-script config file, for -> src/preload
├ ├── vite.renderer.ts Renderer-script config file, for -> src/renderer
├ ├── vite-main.config.ts Main-process config file, for -> src/main
├ ├── vite-preload.config.ts Preload-script config file, for -> src/preload
├ ├── vite-renderer.config.ts Renderer-script config file, for -> src/renderer
├
├── dist After build, it's generated according to the "src" directory
├ ├── main
├ ├── preload
├ ├── renderer
├
├── scripts
├ ├── build.mjs Build script, for -> npm run build
@@ -55,24 +62,6 @@
├
```
#### `dist` and `src`
- Once `npm run dev` or `npm run build` is executed. Will be generated `dist`, it is the same as the `src` structure.
- This ensures the accuracy of path calculation.
```tree
├── dist
| ├── main
| ├── preload
| ├── renderer
├── src
| ├── main
| ├── preload
| ├── renderer
|
```
## Use Electron, NodeJs API
> 🚧 By default, Electron don't support the use of API related to Electron and NoeJs in the Renderer-process, but someone still need to use it. If so, you can see the 👉 npm-package **[vitejs-plugin-electron](https://www.npmjs.com/package/vitejs-plugin-electron)** or another template **[electron-vite-boilerplate](https://github.com/caoxiemeihao/electron-vite-boilerplate)**