How to use the @s-ui/helpers/cli.showWarning function in @s-ui/helpers

To help you get started, we’ve selected a few @s-ui/helpers 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 SUI-Components / sui / packages / sui-bundler / bin / sui-bundler-lib.js View on Github external
webpack(webpackConfig).run((error, stats) => {
  if (error) {
    showError(error, program)
    return 1
  }

  const jsonStats = stats.toJson()

  if (stats.hasErrors()) {
    return jsonStats.errors.map(showError)
  }

  if (stats.hasWarnings()) {
    showWarning('Webpack generated the following warnings: ')
    jsonStats.warnings.map(showWarning)
  }

  console.log(`Webpack stats: ${stats}`)
  showSuccess(
    `Your library is compiled in production mode in: \n${outputFolder}`
  )

  return 0
})