0.3.2 • Published 7 years ago

asar-updater v0.3.2

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

asar-updater

Build Status Dependency Status devDependency Status js-standard-style

An auto updater for electron asar

NPM js-standard-style

Usage

const path = require('path')
const { app } = require('electron')
const updater = require('../')

app.on('ready', () => {
  updater.init()
  updater.on('available', (task) => {
    console.log('available', task)
  })
  updater.on('not-available', (task) => {
    console.log('not-available', task)
  })
  updater.on('progress', (task, p) => {
    console.log(task.name, p)
  })
  updater.on('downloaded', (task) => {
    console.log('downloaded', task)
  })
  updater.on('completed', (manifest, tasks) => {
    console.log('completed', manifest, tasks)
    app.quit()
  })
  updater.on('error', (err) => {
    console.error(err)
    app.quit()
  })
  updater.setFeedURL(path.join(__dirname, 'core.asar'), 'http://git.oschina.net/wedn/ebp/raw/vue/latest/core.json')
  updater.setFeedURL(path.join(__dirname, 'data.asar'), 'http://git.oschina.net/wedn/ebp/raw/vue/latest/data.json')
  updater.checkForUpdates()
})

Example

0.3.2

7 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.6

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.1

8 years ago