@niubir/electron-updater

1.0.2 • Public • Published

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()

Package Sidebar

Install

npm i @niubir/electron-updater

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

564 kB

Total Files

8

Last publish

Collaborators

  • developerzhan