如果你也想整一个 Electron 应用,可以看看这里。
当然,光看这里是不够的,Electron 自己的文档 你也得看。
芒果工具箱是使用 Electron Forge 创建的。大概来说,项目的起点是这一行命令:
npx create-electron-app@latest my-app --template=vite-typescript
在此基础上,再安装了 Vue 和 NaiveUI 作为前端框架。
你看,起步其实并不难。
src 是源代码目录,其中包含四个子目录,其中三个是 Electron Forge 作为模板创建的。
src
main
preload
renderer
my-type
这就是基本结构了,现在你应该了解哪边的代码都在哪里了。
Deleting the wiki page "Structure BasicElectronApp" cannot be undone. Continue?