From ec42fd62ac3ab1ab8e256d3b1c6c53fd645aa86d Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Mon, 25 Mar 2019 11:26:16 -0700 Subject: [PATCH] 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 --- static/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/static/index.js b/static/index.js index 0e9e7e537..b9d53e418 100644 --- a/static/index.js +++ b/static/index.js @@ -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(() => {