当前位置: 首页 > backend >正文

如何使用electron-forge开发上位机ui

Electron Forge是一个用于快速构建、打包和发布Electron应用程序的工具。它提供了一种简单的方式来设置Electron项目,并使用现代工具和最佳实践来管理应用程序的开发和部署过程。使用Electron Forge,开发人员可以轻松地创建跨平台的桌面应用程序,无需深入了解Electron的底层技术细节。Electron Forge提供了一系列的命令行工具和配置选项,使得构建和发布Electron应用变得更加简单和高效。
要下载和安装ElectroForge,您可以按照以下步骤操作:
官网
1、首先你得安装npm,自行搜索

npm install -g electron-forge

在这里插入图片描述
等待安装完成
2、创建你的第一个代码程序

npx create-electron-app@latest my-app

Using templates
Forge’s initialization scripts can add additional template code with the --template=[template-name] flag.

npx create-electron-app@latest my-app --template=webpack

There are currently four first-party templates:

webpack

webpack-typescript

vite

vite-typescript

All of these templates are built around plugins that bundle your JavaScript code for production and includes a dev server to provide a better developer experience.

3、启动代码

cd my-app
npm start

在这里插入图片描述

4、编译代码

npm run make

在这里插入图片描述
生成可执行 程序,交货,下班。

5、Publishing your app
Now you have distributables that you can share with your users. If you run the publish script, Electron Forge will then publish the platform-specific distributables for you, using the publishing method of your choice. For example, if you want to publish your assets to GitHub, you can install the GitHub publisher dependency using:

npm install --save-dev @electron-forge/publisher-github

Once you have configured the publisher according to the documentation, run the following command to upload your distributables:

npm run publish

For more information on what publishers we currently support, check out the Publishers documentation.

6、下一步开始添加自己的功能吧。

http://www.xdnf.cn/news/2675.html

相关文章:

  • 如何开展有组织的AI素养教育?
  • zynq 7010 PS 串口打印
  • 绘制板块层级图
  • 健康养生:开启品质生活的密钥
  • 【jceks】使用keytool和hadoop credential生成和解析jceks文件(无密码storepass)
  • 零基础搭建AI作曲工具:基于Magenta/TensorFlow的交互式音乐生成系统
  • 【计算机视觉】Bayer Pattern与Demosaic算法详解:从传感器原始数据到彩色图像
  • PostgreSQL无法查看表中数据问题排查
  • ARM32静态交叉编译并使用pidstat教程
  • Docker 获取 Python 镜像操作指南
  • 【Web应用服务器_Tomcat】三、Tomcat 性能优化与监控诊断
  • 菱形继承和虚基表
  • go语言八股文(五)
  • 解决Ubuntu20.04重启出现显卡驱动异常的问题(操作记录)
  • k8s基本概念-YAML
  • git 修改用户名和邮箱
  • 【Docker】——在Docker工具上安装创建容器并完成项目部署
  • 线性代数的本质大白话理解
  • 【Linux系统】进程间通信(管道)
  • 8、HTTPD服务--ab压力测试
  • JAVA EE_网络原理_UDP与TCP
  • 二进制、高位低位、位移操作与进制转换全解
  • 国联股份卫多多与北京慧闻科技(集团)签署战略合作协议
  • Kubernetes(k8s)学习笔记(三)--部署 Kubernetes Master
  • 完美解决.NET Framework 4.0 中 System.Drawing 库不支持 WebP 格式的图像处理
  • Android adb 安装应用失败(安装次数限制)
  • 【现代深度学习技术】循环神经网络07:通过时间反向传播
  • 爬虫学习笔记(二)--web请求过程
  • 从代码学习机器学习 - UMAP降维算法 scikit-learn版
  • 【Linux】基于环形队列的生产消费者模型