From ae960027f2b9dc42bfe05777a700af539fc0732d Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Fri, 10 Nov 2017 14:58:21 -0800 Subject: [PATCH] =?UTF-8?q?:wrench:=20Bring=20back=20=E2=80=94abi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- default_app/main.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/default_app/main.js b/default_app/main.js index 9cd225f60..141c15148 100644 --- a/default_app/main.js +++ b/default_app/main.js @@ -34,6 +34,9 @@ for (let i = 0; i < argv.length; i++) { } else if (argv[i] === '--require' || argv[i] === '-r') { option.modules.push(argv[++i]) continue + } else if (argv[i] === '--abi' || argv[i] === '-a') { + option.abi = true + continue } else if (argv[i][0] === '-') { continue } else { @@ -328,6 +331,9 @@ if (option.file && !option.webdriver) { } else if (option.version) { console.log('v' + process.versions.electron) process.exit(0) +} else if (option.abi) { + console.log(process.versions.modules) + process.exit(0) } else if (option.default) { const indexPath = path.join(__dirname, '/index.html') loadApplicationByUrl(`file://${indexPath}`) @@ -348,8 +354,9 @@ if (option.file && !option.webdriver) { Options: -d, --default Run the default bundled Electron app. -i, --interactive Open a REPL to the main process. - -r, --require Module to preload (option can be repeated) - -v, --version Print the version.` + -r, --require Module to preload (option can be repeated). + -v, --version Print the version. + -a, --abi Print the Node ABI version.` console.log(welcomeMessage) const indexPath = path.join(__dirname, '/index.html')