An Electron app boilerplate with BalmJS.
npm install -g balm-core balm-cli
# OR
yarn global add balm-core balm-cli
# Verify
balm -V
# Output:
# balm-cli: 4.0.0
# balm-core: 4.0.0
balm init electron my-project
cd my-project
yarn
# or
npm i
# For development
npm run dev
# For production
npm run prod
ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/
forelectron@6
Q:
UnhandledPromiseRejectionWarning: HTTPError: Response code 404 (Not Found) for `https://npm.taobao.org/mirrors/electron/v6.1.9/electron-v6.1.9-darwin-x64.zip`
A:
- Edit
node_modules/@electron/get/dist/cjs/artifact-utils.js
// line 39
// const path = mirrorVar('customDir', opts, details.version).replace('{{ version }}', details.version.replace(/^v/, ''));
const path = mirrorVar("customDir", opts, details.version.replace("v", ""));
- thx BalmJS