Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli, config): `cli.bannerColor` option #6399

Merged
merged 11 commits into from Sep 30, 2019

Conversation

@danielroe
Copy link
Contributor

danielroe commented Sep 11, 2019

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

This exposes a build.bannerColor option to change the color of the Nuxt title in the CLI banner.

Resolves: #6397

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes
    I think that might be overkill for a simple cosmetic change
  • All new and existing tests are passing.
danielroe added 2 commits Sep 11, 2019
Closes #6397
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Sep 11, 2019

Codecov Report

Merging #6399 into dev will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #6399      +/-   ##
==========================================
+ Coverage   95.65%   95.65%   +<.01%     
==========================================
  Files          79       79              
  Lines        2692     2693       +1     
  Branches      696      696              
==========================================
+ Hits         2575     2576       +1     
  Misses        101      101              
  Partials       16       16
Flag Coverage Δ
#e2e 100% <ø> (ø) ⬆️
#fixtures 50.68% <0%> (-0.02%) ⬇️
#unit 92.35% <100%> (ø) ⬆️
Impacted Files Coverage Δ
packages/config/src/config/cli.js 100% <ø> (ø) ⬆️
packages/cli/src/utils/banner.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 686720f...a42432d. Read the comment docs.

Copy link
Member

pi0 left a comment

We don't include typescript logic here. It may be better an option to customize color.

danielroe added 4 commits Sep 26, 2019
@danielroe danielroe changed the title feat(cli): display blue 'Nuxt' banner if running with TS feat(cli, config): exposes a `build.ui.titleColor` option to change the color of the Nuxt title Sep 26, 2019
@danielroe

This comment has been minimized.

Copy link
Contributor Author

danielroe commented Sep 26, 2019

We don't include typescript logic here. It may be better an option to customize color.

I've exposed a build.ui.titleColor option, with the idea that more ui options could be exposed in future. Is this the right location for this option? If so, I'll prepare a PR updating @nuxt/typescript and @nuxt/types.

@danielroe danielroe requested a review from pi0 Sep 26, 2019
Copy link
Member

galvez left a comment

I'd call it bannerColor instead of ui.titleColor, since we don't immediately have any other options to place under that key.

danielroe added 2 commits Sep 27, 2019
…s into add-blue-for-typescript
@danielroe danielroe changed the title feat(cli, config): exposes a `build.ui.titleColor` option to change the color of the Nuxt title feat(cli, config): exposes a `build.bannerColor` option to change the color of the Nuxt title Sep 27, 2019
@danielroe

This comment has been minimized.

Copy link
Contributor Author

danielroe commented Sep 27, 2019

I'd call it bannerColor instead of ui.titleColor, since we don't immediately have any other options to place under that key.

Done!

@danielroe danielroe requested a review from galvez Sep 27, 2019
@@ -20,7 +20,11 @@ export function showBanner (nuxt, showMemoryUsage = true) {
const messageLines = []

// Name and version
titleLines.push(`${chalk.green.bold('Nuxt.js')} ${nuxt.constructor.version}`)
let bannerColor = 'green'
if (nuxt.options.build) {

This comment has been minimized.

Copy link
@pi0

pi0 Sep 29, 2019

Member

It is a CLI config why in build namespace? 🤔We have config/cli namespace.

@@ -20,7 +20,11 @@ export function showBanner (nuxt, showMemoryUsage = true) {
const messageLines = []

// Name and version
titleLines.push(`${chalk.green.bold('Nuxt.js')} ${nuxt.constructor.version}`)
let bannerColor = 'green'

This comment has been minimized.

Copy link
@pi0

pi0 Sep 29, 2019

Member

Please keep defaults in config package (test snapshots require update)

danielroe added 2 commits Sep 29, 2019
@pi0
pi0 approved these changes Sep 30, 2019
Copy link
Member

pi0 left a comment

LGTM! Thanks ❤️

@pi0 pi0 changed the title feat(cli, config): exposes a `build.bannerColor` option to change the color of the Nuxt title feat(cli, config): `config.bannerColor` option Sep 30, 2019
@pi0 pi0 changed the title feat(cli, config): `config.bannerColor` option feat(cli, config): `cli.bannerColor` option Sep 30, 2019
@pi0 pi0 merged commit 46a7a67 into nuxt:dev Sep 30, 2019
9 checks passed
9 checks passed
Semantic Pull Request ready to be squashed
Details
[ci.azure] nuxt.js #20190930.2 succeeded
Details
ci/circleci: audit Your tests passed on CircleCI!
Details
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: lint-app Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test-e2e Your tests passed on CircleCI!
Details
ci/circleci: test-unit Your tests passed on CircleCI!
Details
@pi0 pi0 mentioned this pull request Sep 30, 2019
@danielroe danielroe deleted the danielroe:add-blue-for-typescript branch Sep 30, 2019
@kevinmarrec

This comment has been minimized.

Copy link
Member

kevinmarrec commented Sep 30, 2019

@danielroe @pi0 Is there any reason the banner border color hasn't be set to the new option ? :P

@kevinmarrec

This comment has been minimized.

Copy link
Member

kevinmarrec commented Sep 30, 2019

image

@Exeteres

This comment has been minimized.

Copy link

Exeteres commented Oct 1, 2019

I have the same question 😳

@danielroe

This comment has been minimized.

Copy link
Contributor Author

danielroe commented Oct 1, 2019

@kevinmarrec @Exeteres I like the idea! (Mind you, in production mode there will be green in the picture too.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.