Add --file option
Summary: Positional arguments with yargs are a mess, so I'm adding a `--file` instead. This can then be used to pass parameters on through the launcher. Reviewed By: danielbuechele Differential Revision: D14525320 fbshipit-source-id: f04ebed85b6eb9e3c82e76736695d41e7bafb301
This commit is contained in:
committed by
Facebook Github Bot
parent
2564bce5a0
commit
3b53aff55c
@@ -38,6 +38,10 @@ if (process.platform === 'darwin') {
|
||||
|
||||
const argv = yargs
|
||||
.usage('$0 [args]')
|
||||
.option('file', {
|
||||
describe: 'Define a file to open on startup.',
|
||||
type: 'string',
|
||||
})
|
||||
.option('updater', {
|
||||
default: true,
|
||||
describe: 'Toggle the built-in update mechanism.',
|
||||
@@ -54,7 +58,8 @@ const argv = yargs
|
||||
type: 'string',
|
||||
})
|
||||
.version(global.__VERSION__)
|
||||
.help().argv;
|
||||
.help()
|
||||
.parse(process.argv.slice(1));
|
||||
|
||||
let {config, configPath, flipperDir} = setup(argv);
|
||||
|
||||
@@ -76,7 +81,7 @@ let win;
|
||||
let appReady = false;
|
||||
let pluginsCompiled = false;
|
||||
let deeplinkURL = null;
|
||||
let filePath = null;
|
||||
let filePath = argv.file;
|
||||
|
||||
// tracking
|
||||
setInterval(() => {
|
||||
|
||||
Reference in New Issue
Block a user