Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hunghg255/rsbuild-plugin-print

Rsbuild Plugin Print
https://github.com/hunghg255/rsbuild-plugin-print

npm plugin print qrcode rsbuild

Last synced: about 1 month ago
JSON representation

Rsbuild Plugin Print

Awesome Lists containing this project

README

        



logo


A plugin print for Rsbuild


NPM Version
NPM Downloads
Minizip
Contributors
License

## Install

```bash
npm i rsbuild-plugin-print -D
```

Rsbuild

```ts
// rsbuild.config.ts
import { pluginPrint } from 'rsbuild-plugin-print';

export default defineConfig({
plugins: [
pluginPrint({
/* options */
}),
],
});
```

Example: [`playground/`](./playground/)


## Options

```ts
import type * as kolorist from 'kolorist';

import type { Options as BoxenOptions } from 'boxen';

type Kolorist = Omit;

export type MessageValue = Omit & {
text: string;
url?: string;
} & {
borderStyle?: BoxenOptions['borderStyle'] | 'none';
};

type Message =
| string
| MessageValue
| ((
kolorist: Kolorist,
) => string | MessageValue | Promise);

export interface IPluginOptions {
info?: Message[];
hostQrcode?: boolean;
}
```

## Demo

![demo](./assets/demo.png)