From 314281cf08b5df54f1d148c8dca2e59974c7fbb8 Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Wed, 5 Oct 2022 15:13:34 +0700 Subject: [PATCH] Removed extraneous logging from Portal dev script refs https://github.com/TryGhost/Toolbox/issues/426 - now Portal is in the monorepo, the dev script doesn't need to wipe the console output nor print instructions as that should be handled with setting environment variables --- ghost/portal/scripts/dev-mode.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/ghost/portal/scripts/dev-mode.js b/ghost/portal/scripts/dev-mode.js index c51f255f15..a8ecf7ef79 100644 --- a/ghost/portal/scripts/dev-mode.js +++ b/ghost/portal/scripts/dev-mode.js @@ -20,16 +20,6 @@ const {v, verbose, port = 5368, basic, b} = minimist(process.argv.slice(2)); const showVerbose = !!(v || verbose); const showBasic = !!(b || basic); -function clearConsole({withHistory = true} = {}) { - if (!withHistory) { - process.stdout.write('\x1Bc'); - return; - } - process.stdout.write( - process.platform === 'win32' ? '\x1B[2J\x1B[0f' : '\x1B[2J\x1B[3J\x1B[H' - ); -} - function maybePluralize(count, noun, suffix = 's') { return `${count} ${noun}${count !== 1 ? suffix : ''}`; } @@ -107,14 +97,6 @@ function printConfigInstruction() { log(); } -function printInstructions() { - log(); - log(chalk.yellowBright.underline(`Add portal to your local Ghost config`)); - printConfigInstruction(); - log(chalk.cyanBright('='.repeat(50))); - log(); -} - function printBuildStart() { if (showVerbose) { log(chalk.bold.greenBright.bgBlackBright(`${'-'.repeat(32)}Building${'-'.repeat(32)}`)); @@ -211,10 +193,8 @@ function startDevServer() { server.listen(port, () => { log(chalk.whiteBright(`Portal dev server is running on http://localhost:${port}`)); - printInstructions(); watchFiles(); }); } -clearConsole({withHistory: false}); startDevServer();