mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
refactor(banner): reduce boxen size (#7532)
Co-authored-by: Clark Du <clark.duxin@gmail.com>
This commit is contained in:
parent
838394815d
commit
5cfaf0aca1
@ -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) {
|
||||
|
@ -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()
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user