# vue-electron

> The vue plugin that attaches electron APIs to the Vue object, making them accessible to all components.

Latest version **1.0.6** (published 2016-12-12) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2016-12-12 |
| First published | 2016-06-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 294 |
| Author | Greg Holguin |
| Maintainers | simulatedgreg |
| Keywords | vue, electron, api, wrapper |

## Links

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

## Recent versions

- 1.0.6 (latest) — 2016-12-12
- 1.0.5 — 2016-12-12
- 1.0.4 — 2016-07-12
- 1.0.2 — 2016-06-09
- 1.0.1 — 2016-06-09
- 1.0.0 — 2016-06-02

## README

# vue-electron
> The vue plugin that wraps [electron](https://github.com/electron/electron) APIs to the Vue object.

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

### Need a full boilerplate for creating electron apps built with vue? Make sure to check out electron-vue.
[https://github.com/SimulatedGREG/electron-vue](https://github.com/SimulatedGREG/electron-vue)

## Installing
Install using NPM
```
npm install vue-electron --save
```

Include using webpack or browserify

**main.js**
```js
import Vue from 'vue'
import VueElectron from 'vue-electron'

Vue.use(VueElectron)
```

## Using the plugin
This plugin will attach electron APIs to the Vue object itself, so accessing all APIs is dead simple. All official documentation from electron can be used and accessed from `this.$electron`.

So instead of...
```js
const electron = require('electron')

export default {
  methods: {
    getName () {
      return electron.remote.app.getName()
    }
  }
}
```

Now you can...

```js
export default {
  methods: {
    getName () {
      return this.$electron.remote.app.getName()
    }
  }
}
```

Now you might be thinking, "Is it really that annoying to simply require electron to access it?" Probably not, but it can get cumbersome to have to include it in every component file that needs it. In the end, attaching electron directly to Vue just makes sense.

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