node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

electron-version

electron-version

Find the installed electron version

Build Status Greenkeeper badge 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.