1.0.0 • Published 4 years ago

electron-quick-start-typescript v1.0.0

Weekly downloads
-
License
CC0-1.0
Repository
github
Last release
4 years ago

Bootstrap

Use Chinese Mirror

$ npm config set ELECTRON_MIRROR=https://cdn.npm.taobao.org/dist/electron/
$ npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
$ npm config set sqlite3_binary_site=https://npm.taobao.org/mirrors/sqlite3/
$ npm config set node_sqlite3_binary_host_mirror=https://npm.taobao.org/mirrors

Install yarn and gulp

yarn
yarn global add gulp

Rebuild sqlite3 module (for Electron)

./node_modules/.bin/electron-rebuild

Build the App

Build the complete App:

gulp build

Only the build renderer page:

gulp buildRendererPage

Start Electron App

yarn start

Hot Reload for Electron

gulp watch

build the complete app and reload if dist/renderer/* changed (a few seconds needed).