fix: avoid printing period after localhost URL (#7499)

* fix: output of URL

* fix: adding formatting to start.ts
This commit is contained in:
James 2022-05-26 03:06:22 -04:00 committed by GitHub
parent 89ddc6d258
commit f94701569b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -76,8 +76,8 @@ export async function serve(
}); });
}); });
logger.success`Serving path=${buildDir} directory at url=${ logger.success`Serving path=${buildDir} directory at: url=${
servingUrl + baseUrl servingUrl + baseUrl
}.`; }`;
server.listen(port); server.listen(port);
} }

View file

@ -67,7 +67,7 @@ export async function start(
const urls = prepareUrls(protocol, host, port); const urls = prepareUrls(protocol, host, port);
const openUrl = normalizeUrl([urls.localUrlForBrowser, baseUrl]); const openUrl = normalizeUrl([urls.localUrlForBrowser, baseUrl]);
logger.success`Docusaurus website is running at url=${openUrl}.`; logger.success`Docusaurus website is running at: url=${openUrl}`;
// Reload files processing. // Reload files processing.
const reload = _.debounce(() => { const reload = _.debounce(() => {
@ -75,7 +75,7 @@ export async function start(
.then(({baseUrl: newBaseUrl}) => { .then(({baseUrl: newBaseUrl}) => {
const newOpenUrl = normalizeUrl([urls.localUrlForBrowser, newBaseUrl]); const newOpenUrl = normalizeUrl([urls.localUrlForBrowser, newBaseUrl]);
if (newOpenUrl !== openUrl) { if (newOpenUrl !== openUrl) {
logger.success`Docusaurus website is running at url=${newOpenUrl}.`; logger.success`Docusaurus website is running at: url=${newOpenUrl}`;
} }
}) })
.catch((err: Error) => { .catch((err: Error) => {