Skip to content

Commit 967fa1c

Browse files
committed
chore: rename package
1 parent 6e3b185 commit 967fa1c

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# rsbuild-plugin-example
1+
# @rsbuild/plugin-vue2-jsx
22

3-
rsbuild-plugin-example is a Rsbuild plugin to do something.
3+
@rsbuild/plugin-vue2-jsx is a Rsbuild plugin to do something.
44

55
<p>
6-
<a href="https://npmjs.com/package/rsbuild-plugin-example">
7-
<img src="https://img.shields.io/npm/v/rsbuild-plugin-example?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
6+
<a href="https://npmjs.com/package/@rsbuild/plugin-vue2-jsx">
7+
<img src="https://img.shields.io/npm/v/@rsbuild/plugin-vue2-jsx?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
88
</a>
99
<img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
1010
</p>
@@ -14,17 +14,17 @@ rsbuild-plugin-example is a Rsbuild plugin to do something.
1414
Install:
1515

1616
```bash
17-
npm add rsbuild-plugin-example -D
17+
npm add @rsbuild/plugin-vue2-jsx -D
1818
```
1919

2020
Add plugin to your `rsbuild.config.ts`:
2121

2222
```ts
2323
// rsbuild.config.ts
24-
import { pluginExample } from "rsbuild-plugin-example";
24+
import { pluginVue2Jsx } from "@rsbuild/plugin-vue2-jsx";
2525

2626
export default {
27-
plugins: [pluginExample()],
27+
plugins: [pluginVue2Jsx()],
2828
};
2929
```
3030

@@ -39,7 +39,7 @@ Some description.
3939
- Example:
4040

4141
```js
42-
pluginExample({
42+
pluginVue2Jsx({
4343
foo: "bar",
4444
});
4545
```

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "rsbuild-plugin-example",
2+
"name": "@rsbuild/plugin-vue2-jsx",
33
"version": "0.0.0",
4-
"repository": "https://github.com/rspack-contrib/rsbuild-plugin-template",
4+
"repository": "https://github.com/rspack-contrib/@rsbuild/plugin-vue2-jsx",
55
"license": "MIT",
66
"type": "module",
77
"exports": {

playground/rsbuild.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineConfig } from '@rsbuild/core';
2-
import { pluginExample } from '../src';
2+
import { pluginVue2Jsx } from '../src';
33

44
export default defineConfig({
5-
plugins: [pluginExample()],
5+
plugins: [pluginVue2Jsx()],
66
});

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import type { RsbuildPlugin } from '@rsbuild/core';
22

3-
export type PluginExampleOptions = {
3+
export type pluginVue2JsxOptions = {
44
foo?: string;
55
bar?: boolean;
66
};
77

8-
export const pluginExample = (
9-
options: PluginExampleOptions = {},
8+
export const pluginVue2Jsx = (
9+
options: pluginVue2JsxOptions = {},
1010
): RsbuildPlugin => ({
11-
name: 'plugin-example',
11+
name: 'plugin-vue2-jsx',
1212

1313
setup() {
1414
console.log('Hello Rsbuild!', options);

test/basic/index.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { dirname } from 'node:path';
22
import { fileURLToPath } from 'node:url';
33
import { expect, test } from '@playwright/test';
44
import { createRsbuild } from '@rsbuild/core';
5-
import { pluginExample } from '../../src';
5+
import { pluginVue2Jsx } from '../../src';
66
import { getRandomPort } from '../helper';
77

88
const __dirname = dirname(fileURLToPath(import.meta.url));
@@ -11,7 +11,7 @@ test('should render page as expected', async ({ page }) => {
1111
const rsbuild = await createRsbuild({
1212
cwd: __dirname,
1313
rsbuildConfig: {
14-
plugins: [pluginExample()],
14+
plugins: [pluginVue2Jsx()],
1515
server: {
1616
port: getRandomPort(),
1717
},
@@ -30,7 +30,7 @@ test('should build succeed', async ({ page }) => {
3030
const rsbuild = await createRsbuild({
3131
cwd: __dirname,
3232
rsbuildConfig: {
33-
plugins: [pluginExample()],
33+
plugins: [pluginVue2Jsx()],
3434
},
3535
});
3636

0 commit comments

Comments
 (0)