238ea29fa8
* Removes un-used and non-functional code coverage helpers * Removes un-used release script aliases * Moves TLS to a lib folder for cleaner directory structure * Implements start.py as start.js for the GN build * Adds a re-usable getElectronExec helper for future scripts * Refactors spec runner to use the helper
26 lines
597 B
JavaScript
26 lines
597 B
JavaScript
const OUT_DIR = process.env.ELECTRON_OUT_DIR || 'Default'
|
|
|
|
const path = require('path')
|
|
|
|
function getElectronExec () {
|
|
switch (process.platform) {
|
|
case 'darwin':
|
|
return `out/${OUT_DIR}/Electron.app/Contents/MacOS/Electron`
|
|
case 'win32':
|
|
return `out/${OUT_DIR}/electron.exe`
|
|
case 'linux':
|
|
return `out/${OUT_DIR}/electron`
|
|
default:
|
|
throw new Error('Unknown platform')
|
|
}
|
|
}
|
|
|
|
function getAbsoluteElectronExec () {
|
|
return path.resolve(__dirname, '../../..', getElectronExec())
|
|
}
|
|
|
|
module.exports = {
|
|
getElectronExec,
|
|
getAbsoluteElectronExec,
|
|
OUT_DIR
|
|
}
|