@plugjs/plug
Version:
PlugJS Build System ===================
29 lines (28 loc) • 1.13 kB
TypeScript
import type { LogLevel } from './levels';
/** Options for the {@link LogEmitter} function family */
export interface LogEmitterOptions {
taskName: string;
level: LogLevel;
indent?: number;
prefix?: string;
}
/** Emit a line (or multiple lines) of text to the log */
export type LogEmitter = (options: LogEmitterOptions, args: any[]) => void;
/** A {@link LogEmitter} function configurable with a specific emitter */
export interface ConfigurableLogEmitter extends LogEmitter {
get emitter(): LogEmitter;
set emitter(emitter: LogEmitter | undefined);
}
/** Emit in full colors with spinner support and whatnot! */
export declare const emitFancy: LogEmitter;
/** Emit in plain text (maybe with some colors?) */
export declare const emitPlain: LogEmitter;
export interface ForkedLogMessage {
logLevel: LogLevel;
taskName: string;
lines: string[];
}
/** Emit to the parent process of a forked child, or to the default emitter */
export declare const emitForked: LogEmitter;
/** A _configurable_ {@link LogEmitter} where log should be emitted to */
export declare const emit: ConfigurableLogEmitter;