Skip to content

Commit

Permalink
refactor(v2): output URL to console only if it has changed (facebook#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 authored May 29, 2021
1 parent b7ea095 commit 1decd6f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/docusaurus/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ export default async function start(
loadSite()
.then(({baseUrl: newBaseUrl}) => {
const newOpenUrl = normalizeUrl([urls.localUrlForBrowser, newBaseUrl]);
console.log(
chalk.cyanBright(`Docusaurus website is running at: ${newOpenUrl}`),
);
if (newOpenUrl !== openUrl) {
console.log(
chalk.cyanBright(`Docusaurus website is running at: ${newOpenUrl}`),
);
}
})
.catch((err) => {
console.error(chalk.red(err.stack));
Expand Down

0 comments on commit 1decd6f

Please sign in to comment.