main.js 298 B

12345678910111213
  1. const { app } = require('electron');
  2. app.whenReady().then(() => {
  3. const payload = {
  4. hasSwitch: app.commandLine.hasSwitch('foobar'),
  5. getSwitchValue: app.commandLine.getSwitchValue('foobar')
  6. };
  7. process.stdout.write(JSON.stringify(payload));
  8. process.stdout.end();
  9. app.quit();
  10. });