我刚开始使用 electron。当我使用 "npm start" 运行 electron 时,我有一个关于如何传递命令行参数到 electron
的疑问。
在 Node.js
中,我使用以下命令:
node server.js one two=three four
用于命令提示符:
var arguments = process.argv.slice(2);
arguments.forEach(function(val,index, array) {
console.log(index + ': ' + val);
});
在 Node.js
中可以正常运行,我想知道如何在 electron 中使其工作。
有人能给出解决方案吗?
electron . one two=three four
。 - justin.m.chase