桌面应用开发
教程
禹神:一小时快速上手Electron,前端Electron开发教程
electron使用electron-builder打包exe文件
检测版本
npm -v
node -v
初始化项目
npm init
安装 Electron
npm i electron -D
打包
npm i electron-builder -D
创建.npmrc 文件
registry=https://registry.npmmirror.com/
electron_mirror=https://npmmirror.com/mirrors/electron/
electron_builder_binaries_mirror=https://npmmirror.com/mirrors/electron-builder-binaries/
sqlite3_binary_host_mirror=https://npmmirror.com/mirrors/sqlite3/
# sass_binary_site=https://npmmirror.com/mirrors/node-sass/
chromedriver_cdnurl=https://npmmirror.com/mirrors/chromedriver/
operadriver_cdnurl=https://npmmirror.com/mirrors/operadriver/
fse_binary_host_mirror=https://npmmirror.com/mirrors/fsevents/
更改路径
用管理员权限打开 Powershell,修改路径
Set-location -Path E:\GitHubLibrary\of_vault_website\of_avatar_generator_2
输入指令
npm run dist
留下评论