How to use the gatsby-cli/lib/reporter.format function in gatsby-cli

To help you get started, we’ve selected a few gatsby-cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gatsbyjs / gatsby / packages / gatsby / src / query / graphql-errors.js View on Github external
function formatFilePath(filePath: string) {
  return `${report.format.bold(`file:`)} ${report.format.blue(filePath)}`
}
github gatsbyjs / gatsby / packages / gatsby / src / query / query-compiler.js View on Github external
reportError(message) {
    const queryErrorMessage = `${report.format.red(`GraphQL Error`)} ${message}`
    report.panicOnBuild(queryErrorMessage)
    if (process.env.gatsby_executing_command === `develop`) {
      websocketManager.emitError(overlayErrorID, queryErrorMessage)
      lastRunHadErrors = true
    }
  }
github gatsbyjs / gatsby / packages / gatsby / src / internal-plugins / query-runner / query-compiler.js View on Github external
reportError(message) {
    const queryErrorMessage = `${report.format.red(`GraphQL Error`)} ${message}`
    report.panicOnBuild(queryErrorMessage)
    if (process.env.gatsby_executing_command === `develop`) {
      websocketManager.emitError(overlayErrorID, queryErrorMessage)
      lastRunHadErrors = true
    }
  }