0.3.2 • Published 9 years ago

asar-updater v0.3.2

Weekly downloads
4
License
MIT
Repository
github
Last release
9 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

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago