From 34c45707f2611eb1545c76539a032e1e01e3aab4 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 18 Nov 2019 11:01:51 +0100 Subject: [PATCH] yarn web :lipstick: --- scripts/code-web.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/scripts/code-web.js b/scripts/code-web.js index 3c7f2d7a489..07c8700f7f9 100755 --- a/scripts/code-web.js +++ b/scripts/code-web.js @@ -20,7 +20,7 @@ const EXTENSIONS_ROOT = path.join(APP_ROOT, 'extensions'); const WEB_MAIN = path.join(APP_ROOT, 'src', 'vs', 'code', 'browser', 'workbench', 'workbench-dev.html'); const args = minimist(process.argv, { - boolean:[ + boolean: [ 'no-launch', 'help' ], @@ -32,17 +32,17 @@ const args = minimist(process.argv, { ], }); -if(args.help){ +if (args.help) { console.log( 'yarn web [options]\n' + - ' --no-launch Do not start browser\n' + - ' --scheme Protocol (https or http)\n' + - ' --host Remote host\n' + - ' --port Remote/Local port\n' + - ' --local_port Local port override\n' + - ' --help\n' + - '[Example]\n' + - ' yarn web --no-launch --scheme https --host example.com --port 8080 --local_port 30000' + ' --no-launch Do not open VSCode web in the browser\n' + + ' --scheme Protocol (https or http)\n' + + ' --host Remote host\n' + + ' --port Remote/Local port\n' + + ' --local_port Local port override\n' + + ' --help\n' + + '[Example]\n' + + ' yarn web --scheme https --host example.com --port 8080 --local_port 30000' ); process.exit(0); } @@ -84,8 +84,9 @@ const server = http.createServer((req, res) => { }); server.listen(LOCAL_PORT, () => { - if(LOCAL_PORT !== PORT) + if (LOCAL_PORT !== PORT) { console.log(`Operating location at http://0.0.0.0:${LOCAL_PORT}`); + } console.log(`Web UI available at ${SCHEME}://${AUTHORITY}`); }); -- GitLab