refactor(banner): reduce boxen size (#7532)

Co-authored-by: Clark Du <clark.duxin@gmail.com>
This commit is contained in:
Sébastien Chopin 2020-06-16 22:48:58 +02:00 committed by GitHub
parent 838394815d
commit 5cfaf0aca1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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) {

View File

@ -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()
})