Electron 快速入门

参考官方文档:http://www.electronjs.org/docs/tutorial/quick-start

按照官方文档操作是中间卡住了。主要是在打包分发程序是,安装Electron Forge失败了。

最后使用了cnpm安装成功了。

参考:electron 安装npm install electron --save-dev 失败

cnpm init
cnpm install electron --save-dev
npx electron -v

安装好后,就可以是使用 cnpm run make  命令打包分发程序了。

发现使用cnpm还是很慢,继续查找资料。

在终端中敲入: npm set ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/

这下可以直接使用npm也很快了。

然后执行npm run make 时报下面错误:

Could not find any make targets configured for the "win32" platform.

解决办法:npx electron-forge import

执行成功后package.json文件会加入config配置:

  "config": {
    "forge": {
      "packagerConfig": {},
      "makers": [
        {
          "name": "@electron-forge/maker-squirrel",
          "config": {
            "name": "my_electron_app"
          }
        },
        {
          "name": "@electron-forge/maker-zip",
          "platforms": [
            "darwin"
          ]
        },
        {
          "name": "@electron-forge/maker-deb",
          "config": {}
        },
        {
          "name": "@electron-forge/maker-rpm",
          "config": {}
        }
      ]
    }
  }

应该是之前忘记执行了。

最后执行 npm run make

然后按照包在out目录下。

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Contents at a Glance Contents at a Glance...........................................................................................................................iii Contents...............................................................................................................................................v Foreword...........................................................................................................................................xix About the Authors..............................................................................................................................xx About the Technical Reviewers.......................................................................................................xxii Acknowledgments..........................................................................................................................xxiii Introduction.....................................................................................................................................xxvi Part I: Jython Basics: Learning the Language....................................................................................1 ■ Chapter 1: Language and Syntax....................................................................................................3 ■ Chapter 2: Data Types and Referencing.......................................................................................25 ■ Chapter 3: Operators, Expressions, and Program Flow...............................................................59 ■ Chapter 4: Defining Functions and Using Built-ins......................................................................81 ■ Chapter 5: Input and Output........................................................................................................105 ■ Chapter 6: Object-Oriented Jython.............................................................................................113 ■ Chapter 7: Exception Handling and Debugging..........................................................................133 ■ Chapter 8: Modules and Packages for Code Reuse...................................................................151 Part II: Using the Language.............................................................................................................163 ■ Chapter 9: Scripting With Jython................................................................................................165 ■ Chapter 10: Jython and Java Integration...................................................................................175 ■ Chapter 11: Using Jython in an IDE............................................................................................197 ■ Chapter 12: Databases and Jython: Object Relational Mapping and Using JDBC....................231 Part III: Developing Applications with Jython................................................................................263 ■ Chapter 13: Simple Web Applications........................................................................................265 ■ Chapter 14: Web Applications With Django................................................................................281 ■ Chapter 15: Introduction to Pylons.............................................................................................327 ■ Chapter 16: GUI Applications......................................................................................................347 ■ CONTENTS AT A GLANCE iv ■ Chapter 17: Deployment Targets................................................................................................359 Part IV: Strategy and Technique......................................................................................................377 ■ Chapter 18: Testing and Continuous Integration.......................................................................379 ■ Chapter 19: Concurrency.............................................................................................................413 ■ Appendix A: Using Other Tools with Jython...............................................................................437 ■ Appendix B: Jython Cookbook....................................................................................................445 ■ Appendix C: Built-in Functions...................................................................................................463 Index.................................................................................................................................................485

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值