Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/hunghg255/rsbuild-plugin-print
- Owner: hunghg255
- Created: 2023-11-08T16:21:11.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-05-03T08:34:05.000Z (8 months ago)
- Last Synced: 2024-11-11T20:35:10.319Z (about 2 months ago)
- Topics: npm, plugin, print, qrcode, rsbuild
- Language: TypeScript
- Homepage:
- Size: 165 KB
- Stars: 14
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- awesome-rspack - rsbuild-plugin-print
README
A plugin print for Rsbuild## 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)