Skip to content
This repository was archived by the owner on Sep 12, 2019. It is now read-only.

Commit 9bf524e

Browse files
committed
Add a banner advertising the final server URL.
So it's not as hard to miss across all the log. Signed-off-by: David Calavera <[email protected]>
1 parent 57dd9f7 commit 9bf524e

File tree

3 files changed

+148
-4
lines changed

3 files changed

+148
-4
lines changed

package-lock.json

Lines changed: 141 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"@oclif/command": "^1",
1212
"@oclif/config": "^1",
1313
"ascii-table": "0.0.9",
14+
"boxen": "^3.0.0",
1415
"copy-template-dir": "^1.4.0",
1516
"execa": "^1.0.0",
1617
"fs-extra": "^7.0.1",

src/commands/dev/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ const { serverSettings } = require('../../detect-server')
99
const openBrowser = require('../../utils/openBrowser')
1010
const Command = require('@netlify/cli-utils')
1111
const { getAddons } = require('netlify/src/addons')
12+
const chalk = require('chalk')
13+
const boxen = require('boxen')
1214

1315
function isFunction(settings, req) {
1416
return settings.functionsPort && req.url.match(/^\/.netlify\/functions\/.+/)
@@ -148,7 +150,10 @@ class DevCommand extends Command {
148150
}
149151

150152
const url = await startProxy(settings, addonUrls)
151-
this.log(`Netlify dev server is now ready on ${url}`)
153+
154+
const banner = chalk.bold(`Netlify dev server is now ready on ${url}`)
155+
this.log(boxen(banner, {padding: 1, margin: 1, align: 'center', borderColor: '#00c7b7'}))
156+
152157
openBrowser(url)
153158
}
154159
}

0 commit comments

Comments
 (0)