Wire up --file/--url on Flipper startup

Summary:
When passing --file or --url explicitly on startup, they should
be used in the same way that event handlers are used.

Reviewed By: jknoxville

Differential Revision: D14598688

fbshipit-source-id: 07179227da3b6c754a4d3a9e15342474e39d72b7
This commit is contained in:
Pascal Hartig
2019-03-25 11:26:16 -07:00
committed by Facebook Github Bot
parent dd3f0fdfeb
commit ec42fd62ac

View File

@@ -43,6 +43,10 @@ const argv = yargs
describe: 'Define a file to open on startup.',
type: 'string',
})
.option('url', {
describe: 'Define a flipper:// URL to open on startup.',
type: 'string',
})
.option('updater', {
default: true,
describe: 'Toggle the built-in update mechanism.',
@@ -81,8 +85,8 @@ process.env.CONFIG = JSON.stringify({
let win;
let appReady = false;
let pluginsCompiled = false;
let deeplinkURL = null;
let filePath = null;
let deeplinkURL = argv.url;
let filePath = argv.file;
// tracking
setInterval(() => {