electron-version

Find the installed electron version

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
electron-version
452.0.14 years ago7 years agoMinified + gzip package size for electron-version in KB

Readme

electron-version
Find the installed electron version

Node version Build Status JavaScript Style Guide

Install

$ npm i electron-version -S

Usage

Calls back with a version string if electron is installed.
const electronVersion = require('electron-version')
electronVersion(function (err, v) {
  console.log(err, v) // null 'v0.33.4'
})

You can optionally specify a custom path to the electron binary.
const path = require('path')
const electronVersion = require('electron-version')
const electronPath = path.join(__dirname, 'node_modules/.bin/electron')

electronVersion(electronPath, function (err, v) {
  console.log(err, v) // null 'v1.6.3'
})

License

All code, unless stated otherwise, is licensed under the WTFPL license.