rsnext/packages/next/build/output/log.ts
Guy Bedford 8221c180a5
ncc 0.25.0 upgrade and fixes (#18873)
This upgrades to ncc@0.25.0 and fixes the previous bugs including:

* ncc not referenced correctly in build
* Babel type errors
* node-fetch, etag, chalk and raw-body dependencies not building with ncc - these have been "un-ncc'd" for now. As they are relatively small dependencies, this doesn't seem too much of an issue and we can follow up in the tracking ncc issue at https://github.com/vercel/ncc/issues/612.
* `yarn dev` issues

Took a lot of bisecting, but the overall diff isn't too bad here in the end.
2020-11-06 02:33:14 +00:00

34 lines
822 B
TypeScript

import chalk from 'chalk'
export const prefixes = {
wait: chalk.cyan('wait') + ' -',
error: chalk.red('error') + ' -',
warn: chalk.yellow('warn') + ' -',
ready: chalk.green('ready') + ' -',
info: chalk.cyan('info') + ' -',
event: chalk.magenta('event') + ' -',
}
export function wait(...message: string[]) {
console.log(prefixes.wait, ...message)
}
export function error(...message: string[]) {
console.error(prefixes.error, ...message)
}
export function warn(...message: string[]) {
console.warn(prefixes.warn, ...message)
}
export function ready(...message: string[]) {
console.log(prefixes.ready, ...message)
}
export function info(...message: string[]) {
console.log(prefixes.info, ...message)
}
export function event(...message: string[]) {
console.log(prefixes.event, ...message)
}