Total Views: quickstart
1
2
| npm init -y
npm install electron --save-dev
|
1
2
3
4
5
6
| // package.json
"main": "main.js",
"scripts": {
"start": "electron .",
"test": "echo \"Error: no test specified\" && exit 1"
},
|
为了将 Electron 的不同类型的进程桥接在一起,我们需要使用被称为 预加载 的特殊脚本。
package
最简单的软件要300M
前置
环境
1
2
| npm install --save-dev @electron-forge/cli
npx electron-forge import
|
如果发布rpm包, 需要安装环境
添加 元数据
1
2
3
| // package.json
"description": "a demo for stu electron",
"author": "zhangzhenda <zhangsan@example.com>",
|
本地打包
github的cicd打包
link
https://www.electronjs.org/zh/docs/latest/