An Electron application with Vue and TypeScript
Recommended IDE Setup
Project Setup
Install
Development
Build
# 使用项目时需要编译模块(旧) cd node_modules\ref-napi\ node-gyp configure node-gyp build # 使用 Greenworks 前注意(由于不再维护,改用Steamworks.js) $ npm install --save --ignore-scripts git+https://github.com/greenheartgames/greenworks.git # https://partner.steamgames.com 下载 Steamworks SDK 覆盖安装至 copy Project\node_modules\greenworks\deps\steamworks_sdk $ npm install $ npm install --save-dev electron-rebuild .\node_modules\.bin\electron-rebuild.cmd # electron-builder.yml extraFiles: - 'steam_appid.txt' # For windows $ npm run build:win # For macOS $ npm run build:mac # For Linux $ npm run build:linux
镜像源问题
npm config edit registry=https://registry.npmmirror.com electron_mirror=https://cdn.npmmirror.com/binaries/electron/ electron_builder_binaries_mirror=https://npmmirror.com/mirrors/electron-builder-binaries/ npm cache clean --force