当前位置: 首页 > 后端技术 > Node.js

一行命令,任意网站变桌面软件

时间:2023-04-03 18:09:49 Node.js

一行命令,任意网站变桌面软件以前,开发一款桌面软件需要耗费大量的人力和时间。现在随着Electron的出现,大大简化了开发门槛。今天,我将介绍一个工具,让您在5分钟内将网站变成可安装的桌面软件。所需工具electron-egg是一个简单、快速、功能丰富的跨平台桌面软件开发框架。查看electron-egg教程效果如下安装工具下载#giteegitclonehttps://gitee.com/wallace5303/electron-egg.gitinstallation#提高安装速度,使用国内镜像npmconfigsetregistryhttps://registry.npm.taobao.org#进入目录./electron-egg/npminstall配置网站#编辑文件./electron/config.js#配置网站地址remoteUrl:{enable:true,//enable:trueurl:'https://讨论。chat/'//任意URL},打包成可执行程序(windows,macOS,linux)都支持#打包(windows版)npmrunbuild-w(32位)npmrunbuild-w-64(64位)#打包(mac版)npmrunbuild-mnpmrunbuild-m-arm64(m1芯片架构)#打包(linux版)npmrunbuild-l安装包在这里./out/installationpackage.exe(dmg,dep等).)快来试试效果吧^_^更多用法见electron-egg教程