How to use the @parcel/logger.chalk function in @parcel/logger

To help you get started, we’ve selected a few @parcel/logger 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 parcel-bundler / parcel / packages / core / parcel-bundler / src / utils / bundleReport.js View on Github external
function prettifySize(size, isLarge) {
  let res = filesize(size);
  if (isLarge) {
    return logger.chalk.yellow(logger.emoji.warning + '  ' + res);
  }
  return logger.chalk.magenta(res);
}
github parcel-bundler / parcel / packages / core / parcel-bundler / src / utils / bundleReport.js View on Github external
function prettifySize(size, isLarge) {
  let res = filesize(size);
  if (isLarge) {
    return logger.chalk.yellow(logger.emoji.warning + '  ' + res);
  }
  return logger.chalk.magenta(res);
}
github parcel-bundler / parcel / packages / core / parcel-bundler / src / Server.js View on Github external
server.once('listening', () => {
      let addon =
        server.address().port !== port
          ? `- ${logger.chalk.yellow(
              `configured port ${port} could not be used.`,
            )}`
          : '';

      logger.persistent(
        `Server running at ${logger.chalk.cyan(
          `${useHTTPS ? 'https' : 'http'}://${host || 'localhost'}:${
            server.address().port
          }`,
        )} ${addon}`,
      );

      resolve(server);
    });
  });