nodegui 使用react开发跨平台应用试用

nodegui官方团队提供了基于react 应用开发方式,同时我们集成官方的packer 进行快速的应用打包

项目说明

项目使用了官方的计算机应用,我使用官方的react starter,同时添加了packer ,当前运行环境为mac,windows以及linux
暂时还没有尝试过

环境准备

  • clone 代码
git clone https://github.com/nodegui/react-nodegui-starter.git
npm i @nodegui/packer --save-dev
  • 添加npm script
  "package":"nodegui-packer --init cal-app && yarn build && nodegui-packer --pack ./dist",

构建&&效果

  • 安装依赖
npm i
  • 构建&&打包
npm run pacakge
  • 效果

  • 运行应用

  • 内存占用

说明

使用nodegui 开发跨平台桌面应用是一个很不错的选择,如果我们对于内存以及cpu 占用要求比较高的话,可以尝试使用此框架

参考资料

https://github.com/rongfengliang/nodegui-react-cal-packer
https://github.com/nodegui/examples/tree/master/react-nodegui/calculator
https://github.com/nodegui/nodegui
https://github.com/nodegui/react-nodegui-starter
https://github.com/nodegui/packer

原文地址:https://www.cnblogs.com/rongfengliang/p/11489965.html