balmjs / template-electron

An Electron project for desktop apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BalmJS template - electron

An Electron app boilerplate with BalmJS.

Requirements

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

Installation

balm init electron my-project

cd my-project
yarn
# or
npm i

Enjoy

# For development
npm run dev

# For production
npm run prod

FAQ

ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/ for electron@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", ""));

About

An Electron project for desktop apps


Languages

Language:JavaScript 92.3%Language:HTML 5.9%Language:SCSS 1.7%