Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/free-planets-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lynx-js/qrcode-rsbuild-plugin": patch
---

Add `README.md`.
8 changes: 7 additions & 1 deletion packages/rspeedy/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</a>
</p>

The built tool for Lynx.

## Getting Started

```bash
Expand All @@ -19,8 +21,12 @@ npm create rspeedy@latest

## Documentation

Visit [Rspeedy Website](https://lynxjs.org/rspeedy/index) to view the full documentation.
Visit [Lynx Website](https://lynxjs.org/rspeedy/index) to view the full documentation.

## Contributing

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 Rspeedy.

## License

Rspeedy is Apache-2.0 licensed.
93 changes: 93 additions & 0 deletions packages/rspeedy/plugin-qrcode/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<p align="center">
<a href="https://lynxjs.org/rspeedy" target="blank"><img src="https://lynxjs.org/assets/rspeedy-banner.png" alt="Rspeedy Logo" /></a>
</p>

<p>
<a aria-label="NPM version" href="https://www.npmjs.com/package/@lynx-js/qrcode-rsbuild-plugin">
<img alt="" src="https://img.shields.io/npm/v/@lynx-js/qrcode-rsbuild-plugin?logo=npm">
</a>
<a aria-label="License" href="https://www.npmjs.com/package/@lynx-js/qrcode-rsbuild-plugin">
<img src="https://img.shields.io/badge/License-Apache--2.0-blue" alt="license" />
</a>
</p>

A Rsbuild plugin that generates and displays QR codes for Lynx bundles directly in the terminal.

## Getting Started

```bash
npm install -D @lynx-js/qrcode-rsbuild-plugin
```

## Usage

<!-- eslint-disable -->

```js
import { pluginQRCode } from '@lynx-js/qrcode-rsbuild-plugin'

export default {
plugins: [pluginQRCode()],
}
```

## Options

### `schema`

Type: `(url: string) => string | Record<string, string>`\
Default: `(url) => ({ http: url })`

The `schema` option allows you to customize the URL format displayed in the QR code.

<!-- eslint-disable -->

```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:

<!-- eslint-disable -->

```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: `bar://lynx?url=${encodeURIComponent(url)}`,
}
},
}),
],
})
```

## Documentation

Visit [Lynx Website](https://lynxjs.org/api/rspeedy/qrcode-rsbuild-plugin.pluginqrcode.html) to view the full documentation.

## Contributing

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.

## License

Rspeedy is Apache-2.0 licensed.
34 changes: 30 additions & 4 deletions packages/rspeedy/plugin-react/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
A Rspeedy plugin to integrate with ReactLynx.
<p align="center">
<a href="https://lynxjs.org/rspeedy" target="blank"><img src="https://lynxjs.org/assets/rspeedy-banner.png" alt="Rspeedy Logo" /></a>
</p>

<p>
<a aria-label="NPM version" href="https://www.npmjs.com/package/@lynx-js/react-rsbuild-plugin">
<img alt="" src="https://img.shields.io/npm/v/@lynx-js/react-rsbuild-plugin?logo=npm">
</a>
<a aria-label="License" href="https://www.npmjs.com/package/@lynx-js/react-rsbuild-plugin">
<img src="https://img.shields.io/badge/License-Apache--2.0-blue" alt="license" />
</a>
</p>

A Rsbuild plugin to integrate with ReactLynx.

## Getting Started

```bash
npm install -D @lynx-js/react-rsbuild-plugin
```

## Getting Started

<!-- eslint-disable -->

```js
// Copyright 2024 The Lynx Authors. All rights reserved.
// Licensed under the Apache License Version 2.0 that can be found in the
// LICENSE file in the root directory of this source tree.
import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
import { defineConfig } from '@lynx-js/rspeedy'

Expand All @@ -16,6 +34,14 @@ export default defineConfig({
})
```

## Documentation

Visit [Lynx Website](https://lynxjs.org/api/rspeedy/react-rsbuild-plugin.pluginreactlynx.html) to view the full documentation.

## Contributing

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.

## License

Rspeedy is Apache-2.0 licensed.