Skip to content

Commit

Permalink
chore(gatsby): add log to gatsby develop if Admin is enabled (#25943)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxstbr authored and KyleAMathews committed Jul 29, 2020
1 parent 600e53e commit 346c1ab
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/gatsby/src/utils/print-instructions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 346c1ab

Please sign in to comment.