A rsbuild plugin for printing QRCode in terminal
npm install @lynx-js/qrcode-rsbuild-pluginA Rsbuild plugin that generates and displays QR codes for Lynx bundles directly in the terminal.
``bash`
npm install -D @lynx-js/qrcode-rsbuild-plugin
`js
import { pluginQRCode } from '@lynx-js/qrcode-rsbuild-plugin'
export default {
plugins: [pluginQRCode()],
}
`
Type: (url: string) => string | Record\(url) => ({ http: url })
Default:
The schema option allows you to customize the URL format displayed in the QR code.
`js
import { pluginQRCode } from '@lynx-js/qrcode-rsbuild-plugin'
import { defineConfig } from '@lynx-js/rspeedy'
export default defineConfig({
plugins: [
pluginQRCode({
schema(url) {
return lynx://${url}?dev=1`
},
}),
],
})
You can also define multiple schemas to switch between them by pressing a in the terminal:
`js
import { pluginQRCode } from '@lynx-js/qrcode-rsbuild-plugin'
import { defineConfig } from '@lynx-js/rspeedy'
export default defineConfig({
plugins: [
pluginQRCode({
schema(url) {
return {
http: url,
foo: foo://lynx?url=${encodeURIComponent(url)}&dev=1,bar://lynx?url=${encodeURIComponent(url)}
bar: ,``
}
},
}),
],
})
Visit Lynx Website to view the full documentation.
Contributions to Rspeedy are welcome and highly appreciated. However, before you jump right into it, we would like you to review our Contribution Guidelines to make sure you have a smooth experience contributing to this project.
Rspeedy is Apache-2.0 licensed.