$ gnpm install electron-version
Find the installed
electron
version
$ npm i electron-version -S
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'
})
All code, unless stated otherwise, is licensed under the WTFPL
license.
Copyright 2013 - present © cnpmjs.org | Home |