@lynx-js/qrcode-rsbuild-plugin-canary 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lynx-js/qrcode-rsbuild-plugin
2
2
 
3
+ ## 0.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - f6c56fb: Add `README.md`.
8
+
3
9
  ## 0.3.2
4
10
 
5
11
  ### Patch Changes
package/README.md ADDED
@@ -0,0 +1,93 @@
1
+ <p align="center">
2
+ <a href="https://lynxjs.org/rspeedy" target="blank"><img src="https://lynxjs.org/assets/rspeedy-banner.png" alt="Rspeedy Logo" /></a>
3
+ </p>
4
+
5
+ <p>
6
+ <a aria-label="NPM version" href="https://www.npmjs.com/package/@lynx-js/qrcode-rsbuild-plugin">
7
+ <img alt="" src="https://img.shields.io/npm/v/@lynx-js/qrcode-rsbuild-plugin?logo=npm">
8
+ </a>
9
+ <a aria-label="License" href="https://www.npmjs.com/package/@lynx-js/qrcode-rsbuild-plugin">
10
+ <img src="https://img.shields.io/badge/License-Apache--2.0-blue" alt="license" />
11
+ </a>
12
+ </p>
13
+
14
+ A Rsbuild plugin that generates and displays QR codes for Lynx bundles directly in the terminal.
15
+
16
+ ## Getting Started
17
+
18
+ ```bash
19
+ npm install -D @lynx-js/qrcode-rsbuild-plugin
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ <!-- eslint-disable -->
25
+
26
+ ```js
27
+ import { pluginQRCode } from '@lynx-js/qrcode-rsbuild-plugin'
28
+
29
+ export default {
30
+ plugins: [pluginQRCode()],
31
+ }
32
+ ```
33
+
34
+ ## Options
35
+
36
+ ### `schema`
37
+
38
+ Type: `(url: string) => string | Record<string, string>`\
39
+ Default: `(url) => ({ http: url })`
40
+
41
+ The `schema` option allows you to customize the URL format displayed in the QR code.
42
+
43
+ <!-- eslint-disable -->
44
+
45
+ ```js
46
+ import { pluginQRCode } from '@lynx-js/qrcode-rsbuild-plugin'
47
+ import { defineConfig } from '@lynx-js/rspeedy'
48
+
49
+ export default defineConfig({
50
+ plugins: [
51
+ pluginQRCode({
52
+ schema(url) {
53
+ return `lynx://${url}?dev=1`
54
+ },
55
+ }),
56
+ ],
57
+ })
58
+ ```
59
+
60
+ You can also define multiple schemas to switch between them by pressing `a` in the terminal:
61
+
62
+ <!-- eslint-disable -->
63
+
64
+ ```js
65
+ import { pluginQRCode } from '@lynx-js/qrcode-rsbuild-plugin'
66
+ import { defineConfig } from '@lynx-js/rspeedy'
67
+
68
+ export default defineConfig({
69
+ plugins: [
70
+ pluginQRCode({
71
+ schema(url) {
72
+ return {
73
+ http: url,
74
+ foo: `foo://lynx?url=${encodeURIComponent(url)}&dev=1`,
75
+ bar: `bar://lynx?url=${encodeURIComponent(url)}`,
76
+ }
77
+ },
78
+ }),
79
+ ],
80
+ })
81
+ ```
82
+
83
+ ## Documentation
84
+
85
+ Visit [Lynx Website](https://lynxjs.org/api/rspeedy/qrcode-rsbuild-plugin.pluginqrcode.html) to view the full documentation.
86
+
87
+ ## Contributing
88
+
89
+ Contributions to Rspeedy are welcome and highly appreciated. However, before you jump right into it, we would like you to review our [Contribution Guidelines](/contributing.md) to make sure you have a smooth experience contributing to this project.
90
+
91
+ ## License
92
+
93
+ Rspeedy is Apache-2.0 licensed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/qrcode-rsbuild-plugin-canary",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "A rsbuild plugin for printing QRCode in terminal",
5
5
  "keywords": [
6
6
  "rsbuild",
@@ -47,7 +47,7 @@
47
47
  "@microsoft/api-extractor": "7.51.0",
48
48
  "@rsbuild/core": "1.2.11",
49
49
  "@types/qrcode-terminal": "^0.12.2",
50
- "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.8.2-canary-20250302-1abf8f01"
50
+ "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.8.2"
51
51
  },
52
52
  "engines": {
53
53
  "node": ">=18"