用electrion官网的不行。

还好,可以直接照搬 https://github.com/maximegris/angular-electron

安装必要的库

npm i --save-dev electron electron-builder electron-reload npm-run-all wait-on

需要从angular-electron 里复制出来:

./下的

main.ts

tsconfig.json

tsconfig.app.json

tsconfig-serve.json

postinstall.js

postinstall-web.js

electron-builder.json

需要参考修改的: 懒得修改,直接照搬

package.json

  "main": "main.js", //增加

  "scripts": {
"postinstall": "npm run postinstall:electron && electron-builder install-app-deps",
"postinstall:web": "node postinstall-web",
"postinstall:electron": "node postinstall",
"ng": "ng",
"start": "npm run postinstall:electron && npm-run-all -p ng:serve electron:serve",
"build": "npm run postinstall:electron && npm run electron:serve-tsc && ng build",
"build:dev": "npm run build -- -c dev",
"build:prod": "npm run build -- -c production",
"ng:serve": "ng serve",
"ng:serve:web": "npm run postinstall:web && ng serve -o",
"electron:serve-tsc": "tsc -p tsconfig-serve.json",
"electron:serve": "wait-on http-get://localhost:4200/ && npm run electron:serve-tsc && electron . --serve",
"electron:local": "npm run build:prod && electron .",
"electron:linux": "npm run build:prod && electron-builder build --linux",
"electron:windows": "npm run build:prod && electron-builder build --windows",
"electron:mac": "npm run build:prod && electron-builder build --mac",
"test": "npm run postinstall:web && ng test",
"e2e": "npm run build:prod && mocha --timeout 300000 --require ts-node/register e2e/**/*.spec.ts",
"version": "conventional-changelog -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md",
"lint": "ng lint"
},

最新文章

  1. 返水bug-中澳
  2. Mongodb在windows下的安装和启动
  3. python __file__ 与相对路径
  4. cocos2d 定时器
  5. IE9的css hack
  6. linux之使用cron,logrotate管理日志文件
  7. 安装PIL库时提示python未注册错误(自定义python安装路径)
  8. mysql中enum的用法
  9. Android JNI环境要SQLite加密模块简介
  10. 深入理解Linux内核 学习笔记(4)
  11. Elasticsearch-6.7.0系列(四)Metricbeat仪表盘。本身无端口,依赖kibana
  12. 通用base.css —— 《编写高质量代码 web前端开发修炼之道》
  13. luogu P2515 [HAOI2010]软件安装
  14. 论文笔记系列-Simple And Efficient Architecture Search For Neural Networks
  15. 【转】Windows下selenium+python自动化测试环境搭建
  16. 第 8 章 容器网络 - 053 - overlay 是如何隔离的?
  17. Codeforces731C(SummerTrainingDay06-M 并查集)
  18. 项目中使用protobuf
  19. halcon之共线连接union_collinear_contours_xld
  20. Android -- 网络图片查看器,网络html查看器, 消息机制, 消息队列,线程间通讯

热门文章

  1. PHP生成中文验证码并检测对错实例
  2. 如何使用加多宝(jdb)在linux下调试Java程序
  3. 【原创】大叔问题定位分享(35)spring中session失效时间
  4. ubuntu下安装vue/cli提示No command 'vue' found
  5. 公众平台第三方平台 .NET开发
  6. Entity Framework:三种开发模式实现数据访问
  7. 平时工作常用linux命令总结
  8. promises的深入学习
  9. 8、nginx基础
  10. vim 绑定到 source insight 快捷键