Repository: nuxt/nuxt.js
Pull request #7532 (2020-06-16 18:00:32)

refactor(banner): reduce boxen size
<!--- Provide a general summary of your changes in the title above -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [x] 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
<!--- Describe your changes in detail -->
<!--- Why is this change required? What problem does it solve? -->
<!--- If it resolves an open issue, please link to the issue here. For example "Resolves: #1337" -->
Reduce the boxen width:
![Screenshot 2020-06-16 at 19 57 44](https://user-images.githubusercontent.com/904724/84810684-f9c83d80-b00b-11ea-845d-558803515739.png)


## Checklist:
<!--- Put an `x` in all the boxes that apply. -->
<!--- If your change requires a documentation PR, please link it appropriately -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly. (PR: #)
- [ ] I have added tests to cover my changes (if not applicable, please state why)
- [ ] All new and existing tests are passing.



Atinux: Changed to use triangles:

![Screenshot 2020-06-16 at 20 02 38](https://user-images.githubusercontent.com/904724/84811166-bfab6b80-b00c-11ea-902a-7d6bf8047cae.png)


Patch:
diff --git a/packages/cli/src/utils/banner.js b/packages/cli/src/utils/banner.js
index 8a8ebdb6a..c13fa41ad 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/vue-app/template/utils.js b/packages/vue-app/template/utils.js
index e6e145344..67ddb25cb 100644
--- a/packages/vue-app/template/utils.js
+++ b/packages/vue-app/template/utils.js
@@ -596,7 +596,7 @@ function formatUrl (url, query) {
   let parts = url.split('/')
   let result = (protocol ? protocol + '://' : '//') + parts.shift()
 
-  let path = parts.filter(Boolean).join('/')
+  let path = parts.join('/')
   let hash
   parts = path.split('#')
   if (parts.length === 2) {


Test patch:
diff --git a/packages/cli/test/unit/utils.test.js b/packages/cli/test/unit/utils.test.js
index cbc89df25..3a8220a28 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()
   })