本文整理匯總了TypeScript中electron.remote.app.getVersion方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript remote.app.getVersion方法的具體用法?TypeScript remote.app.getVersion怎麽用?TypeScript remote.app.getVersion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類electron.remote.app
的用法示例。
在下文中一共展示了remote.app.getVersion方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: function
value: function() {
// Note: First and second arguments are related to Electron
const a = remote.process.argv.slice(2);
a.push(
'--cmd', `let\ g:nyaovim_version="${remote.app.getVersion()}"`,
'--cmd', `set\ rtp+=${join(__dirname, '..', 'runtime').replace(' ', '\ ')}`
);
// XXX:
// Swap files are disabled because it shows message window on start up but frontend can't detect it.
a.push('-n');
return a;
},
示例2: function
value: function() {
// Note:
// First and second arguments are related to Electron
// XXX:
// Spectron additionally passes many specific arguments to process and 'nvim' process
// will fail because of them. As a workaround, we stupidly ignore arguments on E2E tests.
const a = process.env.NYAOVIM_E2E_TEST_RUNNING ? [] : remote.process.argv.slice(2);
a.push(
'--cmd', `let\ g:nyaovim_version="${remote.app.getVersion()}"`,
'--cmd', `set\ rtp+=${join(__dirname, '..', 'runtime').replace(' ', '\ ')}`,
);
// XXX:
// Swap files are disabled because it shows message window on start up but frontend can't detect it.
a.push('-n');
return a;
},