16 lines
317 B
JavaScript
16 lines
317 B
JavaScript
|
const { app } = require('electron')
|
||
|
|
||
|
app.on('ready', () => {
|
||
|
const payload = {
|
||
|
hasSwitch: app.commandLine.hasSwitch('foobar'),
|
||
|
getSwitchValue: app.commandLine.getSwitchValue('foobar')
|
||
|
}
|
||
|
|
||
|
process.stdout.write(JSON.stringify(payload))
|
||
|
process.stdout.end()
|
||
|
|
||
|
setImmediate(() => {
|
||
|
app.quit()
|
||
|
})
|
||
|
})
|