构建electron开发调试环境

Windows下构建electron开发调试环境

环境依赖

构建工具

Electrong构建工具build-tools

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 全局安装构建工具
$ npm i -g @electron/build-tools

# 初始化 Electron 本地开发环境
$ e init

# 从主分支制作 “release” 和 “testing” 构建版本。
$ e init main-releaseg -i release --root=/project
Creating '/project'
New build config 'main-releaseg' created
Now using config 'main-releaseg'

# 显示已经初始化的配置
$ e show configs
* main-release

# 显示当前配置
$ e show current
main-release

# 切换到指定配置
$ e use main-testing
Now using config 'main-testing'

# 显示项目目录
$ e show root
/project

# 同步代码
$ e sync
Running "gclient sync --with_branch_heads --with_tags" in '/project/src'
[sync output omitted]