代码改变世界

electron初步入门

2022-12-31 15:49  轩脉刃  阅读(89)  评论(0编辑  收藏  举报

界面部分打算使用electron来进行开发。

https://www.electronjs.org/zh/docs/latest/

这次打算从头开始集成,这样能更好了解前端原理。

安装

https://www.electronjs.org/zh/docs/latest/tutorial/quick-start

npm init

npm install --save-dev electron

{
  "scripts": {
    "start": "electron ."
  }
}


npm start

➜  toolbox git:(main) ✗ node -v
v16.19.0
➜  toolbox git:(main) ✗ npm -v
8.19.3

预加载脚本

我理解预加载脚本是一个中转器。

参考

https://github.com/sindresorhus/awesome-electron

https://github.com/hooray/fantastic-admin

[hooray.github.io/fantastic-admin/](