From 5cfaf0aca10a549e35d6008ead2e57281f76336f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Tue, 16 Jun 2020 22:48:58 +0200 Subject: [PATCH] refactor(banner): reduce boxen size (#7532) Co-authored-by: Clark Du --- packages/cli/src/utils/banner.js | 2 +- packages/cli/test/unit/utils.test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/cli/src/utils/banner.js b/packages/cli/src/utils/banner.js index 8a8ebdb6ae..c13fa41adf 100644 --- a/packages/cli/src/utils/banner.js +++ b/packages/cli/src/utils/banner.js @@ -26,7 +26,7 @@ export function showBanner (nuxt, showMemoryUsage = true) { // Running mode const rendering = nuxt.options.render.ssr ? chalk.bold.yellow('server-side') : chalk.bold.yellow('client-side') const envMode = nuxt.options.dev ? chalk.bold.blue('development') : chalk.bold.green('production') - const sentence = `Running in ${envMode}, with ${rendering} rendering and ${chalk.bold.cyan(nuxt.options.target)} target.` + const sentence = `△ Server: ${envMode}\n△ Rendering: ${rendering}\n△ Target: ${chalk.bold.cyan(nuxt.options.target)}` titleLines.push(sentence) if (showMemoryUsage) { diff --git a/packages/cli/test/unit/utils.test.js b/packages/cli/test/unit/utils.test.js index cbc89df25e..3a8220a28a 100644 --- a/packages/cli/test/unit/utils.test.js +++ b/packages/cli/test/unit/utils.test.js @@ -225,9 +225,9 @@ describe('cli/utils', () => { expect(successBox).toHaveBeenCalledTimes(1) expect(stdout).toHaveBeenCalledTimes(1) expect(stdout).toHaveBeenCalledWith(expect.stringMatching('Nuxt.js')) - expect(stdout).toHaveBeenCalledWith(expect.stringMatching('Running in production')) - expect(stdout).toHaveBeenCalledWith(expect.stringMatching('client-side rendering')) - expect(stdout).toHaveBeenCalledWith(expect.stringMatching('static target')) + expect(stdout).toHaveBeenCalledWith(expect.stringMatching('△ Server: production')) + expect(stdout).toHaveBeenCalledWith(expect.stringMatching('△ Rendering: client-side')) + expect(stdout).toHaveBeenCalledWith(expect.stringMatching('△ Target: static')) stdout.mockRestore() })