@niubir/electron-updater
v1.0.2
Published
This electron updater util
Downloads
4
Maintainers
Readme
electron-updater
- This is an update component about electron
Server Install
Quick Setup Guide
- Install.
npm i @niubir/electron-updater
- Configure.
- package.json
{ ... "build": { "publish": [ { "provider": "generic", "url": "http://app.abc123.com/update" } ] } ... }
- use
const path = require('path') const { initAutoUpdater, versionCheck } = require('@niubir/electron-updater') const { version, build: { publish } } = require('./package.json') // Dev app-update.yml let devUpdateConfigPath = null if (!app.isPackaged) { devUpdateConfigPath = path.join(__dirname, './app-update.yml') } initAutoUpdater({ version: version, updaterConfig: { feedURL: publish[0].url, devUpdateConfigPath: devUpdateConfigPath } }) versionCheck()