mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
feat(cli, config): cli.bannerColor
option (#6399)
This commit is contained in:
parent
578d5d41f4
commit
46a7a67ad4
@ -20,7 +20,8 @@ export function showBanner (nuxt, showMemoryUsage = true) {
|
||||
const messageLines = []
|
||||
|
||||
// Name and version
|
||||
titleLines.push(`${chalk.green.bold('Nuxt.js')} ${nuxt.constructor.version}`)
|
||||
const { bannerColor } = nuxt.options.cli
|
||||
titleLines.push(`${chalk[bannerColor].bold('Nuxt.js')} ${nuxt.constructor.version}`)
|
||||
|
||||
// Running mode
|
||||
titleLines.push(`Running in ${nuxt.options.dev ? chalk.bold.blue('development') : chalk.bold.green('production')} mode (${chalk.bold(nuxt.options.mode)})`)
|
||||
|
@ -17,7 +17,9 @@ describe('cli/utils', () => {
|
||||
|
||||
showBanner({
|
||||
options: {
|
||||
cli: {}
|
||||
cli: {
|
||||
bannerColor: 'green'
|
||||
}
|
||||
},
|
||||
server: {
|
||||
listeners
|
||||
|
@ -129,6 +129,7 @@ describe('cli/utils', () => {
|
||||
jest.spyOn(fmt, 'successBox').mockImplementation(successBox)
|
||||
|
||||
const badgeMessages = [ 'badgeMessage' ]
|
||||
const bannerColor = 'green'
|
||||
const listeners = [
|
||||
{ url: 'first' },
|
||||
{ url: 'second' }
|
||||
@ -137,7 +138,8 @@ describe('cli/utils', () => {
|
||||
showBanner({
|
||||
options: {
|
||||
cli: {
|
||||
badgeMessages
|
||||
badgeMessages,
|
||||
bannerColor
|
||||
}
|
||||
},
|
||||
server: {
|
||||
@ -163,7 +165,8 @@ describe('cli/utils', () => {
|
||||
showBanner({
|
||||
options: {
|
||||
cli: {
|
||||
badgeMessages: []
|
||||
badgeMessages: [],
|
||||
bannerColor: 'green'
|
||||
}
|
||||
},
|
||||
server: {
|
||||
|
@ -1,3 +1,4 @@
|
||||
export default () => ({
|
||||
badgeMessages: []
|
||||
badgeMessages: [],
|
||||
bannerColor: 'green'
|
||||
})
|
||||
|
@ -149,6 +149,7 @@ Object {
|
||||
"buildModules": Array [],
|
||||
"cli": Object {
|
||||
"badgeMessages": Array [],
|
||||
"bannerColor": "green",
|
||||
},
|
||||
"css": Array [],
|
||||
"debug": false,
|
||||
|
@ -129,6 +129,7 @@ Object {
|
||||
"buildModules": Array [],
|
||||
"cli": Object {
|
||||
"badgeMessages": Array [],
|
||||
"bannerColor": "green",
|
||||
},
|
||||
"css": Array [],
|
||||
"debug": undefined,
|
||||
@ -480,6 +481,7 @@ Object {
|
||||
"buildModules": Array [],
|
||||
"cli": Object {
|
||||
"badgeMessages": Array [],
|
||||
"bannerColor": "green",
|
||||
},
|
||||
"css": Array [],
|
||||
"debug": undefined,
|
||||
|
Loading…
Reference in New Issue
Block a user