基于Electron框架搭建的桌面应用项目,包括目录结构设计、自动构建和软件升级等
发布于 8 年前 作者 xiaoping6688 7443 次预览 最后一次回复是 8 年前 来自 分享
electron-project
基于Electron框架:提供了一个能通过 JavaScript 和 HTML 创建桌面应用的平台,同时集成 Node 来授予网页访问底层系统的权限。 https://github.com/xiaoping6688/electron-project
- 本地构建、方便开发和调试
- 开发环境和应用分离,便于打包
- 软件依赖环境自动下载,Inno Setup 打包 exe(需要安装InnoSetup软件,项目build编译后运行build/setup-win.iss)
- 软件升级检查(将upgrade.json文件传至服务器)
Build Setup
# install dependencies
npm install
# start client for development
npm start
# build for production with win32
npm run win32
# build for production with win64
npm run win64
# build for production with mac
npm run mac
# check update for npm packages, please install 'npm install npm-check-updates -g' at first
npm run update
4 回复
我建议用electron-react-boilerplate
好文,不过我一直想问 electron 有可能跑在 xp 下吗
@rwing 不能,那得用NW.js(node-webkit)
@ystyle 很不错: https://github.com/chentsulin/electron-react-boilerplate