# vue-electron-updater

> > Just a simple package to allow Electron + Vue application can play the updater smoothly

Latest version **0.0.5** (published 2024-01-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue-electron-updater
pnpm add vue-electron-updater
yarn add vue-electron-updater
bun add vue-electron-updater
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2024-01-24 |
| First published | 2024-01-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 7 |
| Unpacked size | 72.4 KB |
| Known vulnerabilities | 0 (+33 in 2 direct dependencies) |
| Install scripts | no |
| Author | Sang Nguyen |
| Maintainers | tasynguyen |

## Links

- npm: https://www.npmjs.com/package/vue-electron-updater
- Homepage: https://github.com/tasynguyen3894/vue-electron-updater#readme
- Issues: https://github.com/tasynguyen3894/vue-electron-updater/issues
- npm.io page: https://npm.io/package/vue-electron-updater

## Dependencies (7)

- [h3](https://npm.io/package/h3.md) ^1.9.0
- [vue](https://npm.io/package/vue.md) ^3.4.3
- [vitest](https://npm.io/package/vitest.md) ^1.2.0
- [electron](https://npm.io/package/electron.md) ^28.1.1
- [builtin-modules](https://npm.io/package/builtin-modules.md) ^3.3.0
- [electron-updater](https://npm.io/package/electron-updater.md) ^6.1.7
- [vite-plugin-commonjs-externals](https://npm.io/package/vite-plugin-commonjs-externals.md) ^0.1.4

## Recent versions

- 0.0.5 (latest) — 2024-01-24
- 0.0.3 — 2024-01-18
- 0.0.1 — 2024-01-06

## README

# vue-electron-updater

> Just a simple package to allow Electron + Vue application can play the updater smoothly

## Install

```
yarn add vue-electron-updater
```

## Usage

To use this, we need to install the function in `main` and `preload` scripts.

In the `main` script we can install the setup via the `setup` method from `ApplicationAutoUpdater` instance like this.


```js
import { BrowserWindow, ipcMain } from 'electron';
import { autoUpdater } from 'electron-updater';
import { ApplicationAutoUpdater } from 'vue-electron-updater/main';

const applicationUpdater = new ApplicationAutoUpdater(
  autoUpdater,
  new BrowserWindow({
  }), 
  ipcMain
);
applicationUpdater.setup({
  isDev: true,
  port: 5050
});
```

In the `preload` script, we can install the setup via the function `setupPreload`.

```js
import { contextBridge, ipcRenderer } from 'electron';
import { setupPreload } from 'vue-electron-updater/preload';

setupPreload(contextBridge, ipcRenderer);
```

In Vue, we need to install the plugin:

```js
import { createApplicationUpdater } from 'vue-electron-updater/vue';

app.use(createApplicationUpdater());
```

## License

MIT &copy; [Sang Nguyen](https://github.com/tasynguyen3894)

---
_Source: https://npm.io/package/vue-electron-updater · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
