From 41b65aed74dc4ee3bdf3af0b0cc0d1bcacd0a4dd Mon Sep 17 00:00:00 2001 From: Max Stoiber Date: Wed, 22 Jul 2020 08:06:25 +0200 Subject: [PATCH] Add console.log if Gatsby Admin is enabled --- .../gatsby/src/utils/print-instructions.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/gatsby/src/utils/print-instructions.ts b/packages/gatsby/src/utils/print-instructions.ts index 287b2a531c4ab..41392bfe35e5b 100644 --- a/packages/gatsby/src/utils/print-instructions.ts +++ b/packages/gatsby/src/utils/print-instructions.ts @@ -41,6 +41,27 @@ export function printInstructions(appName: string, urls: IPreparedUrls): void { console.log(` ${urls.localUrlForTerminal}___graphql`) } + if (process.env.GATSBY_EXPERIMENTAL_ENABLE_ADMIN) { + console.log() + console.log( + `View Admin, an in-browser app to manage your site's configuration` + ) + console.log() + + if (urls.lanUrlForTerminal) { + console.log( + ` ${chalk.bold(`Local:`)} ${ + urls.localUrlForTerminal + }___admin` + ) + console.log( + ` ${chalk.bold(`On Your Network:`)} ${urls.lanUrlForTerminal}___admin` + ) + } else { + console.log(` ${urls.localUrlForTerminal}___admin`) + } + } + console.log() console.log(`Note that the development build is not optimized.`) console.log(