@dimensional-innovations/vue-electron-version
v2.0.5
Published
show the app version
Readme
@dimensional-innovations/vue-electron-version
A simple vue component which is designed to briefly show the version number on app startup. Place in App.vue using the example below.
Install
yarn add @dimensional-innovations/vue-electron-versionor
npm install @dimensional-innovations/vue-electron-version -SUsage
In your main file, call initVersion to setup the required handlers in the main process:
import { app } from 'electron';
import { initVersion } from '@dimensional-innovations/vue-electron-version/dist/main';
(async function init() {
await app.whenReady();
initVersion();
})()Sample App.vue file
<template>
<div id="app">
<version />
</div>
</template>
<script>
import { Version } from '@dimensional-innovations/vue-electron-version';
import '@dimensional-innovations/vue-electron-version/dist/style.css';
export default {
name: 'App',
components: {
Version,
},
};
</script>Features
- Make the version number persistent by passing the
persistflag into the component:<version v-bind:persist=true />. - Change the amount of time the version number is visible by passing the timeout flag into the component:
<version v-bind:timeout=5000 />
