A plugin print for Rsbuild
npm i rsbuild-plugin-print -D
Rsbuild
// rsbuild.config.ts
import { pluginPrint } from 'rsbuild-plugin-print';
export default defineConfig({
plugins: [
pluginPrint({
/* options */
}),
],
});
Example: playground/
import type * as kolorist from 'kolorist';
import type { Options as BoxenOptions } from 'boxen';
type Kolorist = Omit<typeof kolorist, 'SupportLevel' | 'options'>;
export type MessageValue = Omit<BoxenOptions, 'borderStyle'> & {
text: string;
url?: string;
} & {
borderStyle?: BoxenOptions['borderStyle'] | 'none';
};
type Message =
| string
| MessageValue
| ((
kolorist: Kolorist,
) => string | MessageValue | Promise<string | MessageValue | void>);
export interface IPluginOptions {
info?: Message[];
hostQrcode?: boolean;
}