Skip to content

layout: post title: "electron" subtitle: "electron" date: 2019-05-24 14:55:13 author: "none" header-img: "img/posts/default_post.jpg" catalog: true tags: - tag


zerorpc

zerorpc 依赖node-gyp, node-gyp不支持python3, node-gyp使用visual studio进行编译,版本问题

npm install --vs2015 -g windows-build-tools
npm install --python="C:\Program Files\Python27\python.exe" --msvs_version=2015 zerorpc

打包

打包工具

npm install electron-builder --save-dev

打包配置

package.json

"build": {
    "appId": "com.xxx.app",
    "mac": {
      "target": ["dmg","zip"]
    },
    "win": {
      "target": ["nsis","zip"]
    }
},
"scripts": {
    "dist": "electron-builder --win --x64"
},

打包命令

npm run dist

vscode

查看所有快捷键

Ctrl + Shift + p, Open Keyboard Shortcuts

代码折叠

# 折叠 n=0,1,2 ...
ctrl+k ctrl+<n>

# 展开
ctrl+k ctrl+j

文本编辑

# 括号跳转
Ctrl + Shift + \

# 多行编辑
alt + shift + 鼠标左键(拖动)
alt + 鼠标左键(点选)

# 大小写转换
ctrl + shift + p, uppercase