Skip to content

Commit

Permalink
chore: rename package
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Aug 10, 2024
1 parent 035f692 commit 4b6e507
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# rsbuild-plugin-example
# @rsbuild/plugin-styled-components

rsbuild-plugin-example is a Rsbuild plugin to do something.
An Rsbuild plugin to provides compile-time support for styled-components.

<p>
<a href="https://npmjs.com/package/rsbuild-plugin-example">
<img src="https://img.shields.io/npm/v/rsbuild-plugin-example?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
<a href="https://npmjs.com/package/@rsbuild/plugin-styled-components">
<img src="https://img.shields.io/npm/v/@rsbuild/plugin-styled-components?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
</a>
<img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
</p>
Expand All @@ -14,17 +14,17 @@ rsbuild-plugin-example is a Rsbuild plugin to do something.
Install:

```bash
npm add rsbuild-plugin-example -D
npm add @rsbuild/plugin-styled-components -D
```

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

```ts
// rsbuild.config.ts
import { pluginExample } from "rsbuild-plugin-example";
import { pluginStyledComponents } from "@rsbuild/plugin-styled-components";

export default {
plugins: [pluginExample()],
plugins: [pluginStyledComponents()],
};
```

Expand All @@ -39,7 +39,7 @@ Some description.
- Example:

```js
pluginExample({
pluginStyledComponents({
foo: "bar",
});
```
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rsbuild-plugin-example",
"name": "@rsbuild/plugin-styled-components",
"version": "0.0.0",
"repository": "https://github.com/rspack-contrib/rsbuild-plugin-template",
"repository": "https://github.com/rspack-contrib/rsbuild-plugin-styled-components",
"license": "MIT",
"type": "module",
"exports": {
Expand Down
4 changes: 2 additions & 2 deletions playground/rsbuild.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig } from '@rsbuild/core';
import { pluginExample } from '../src';
import { pluginStyledComponents } from '../src';

export default defineConfig({
plugins: [pluginExample()],
plugins: [pluginStyledComponents()],
});
6 changes: 3 additions & 3 deletions test/basic/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import { expect, test } from '@playwright/test';
import { createRsbuild } from '@rsbuild/core';
import { pluginExample } from '../../src';
import { pluginStyledComponents } from '../../src';
import { getRandomPort } from '../helper';

const __dirname = dirname(fileURLToPath(import.meta.url));
Expand All @@ -11,7 +11,7 @@ test('should render page as expected', async ({ page }) => {
const rsbuild = await createRsbuild({
cwd: __dirname,
rsbuildConfig: {
plugins: [pluginExample()],
plugins: [pluginStyledComponents()],
server: {
port: getRandomPort(),
},
Expand All @@ -30,7 +30,7 @@ test('should build succeed', async ({ page }) => {
const rsbuild = await createRsbuild({
cwd: __dirname,
rsbuildConfig: {
plugins: [pluginExample()],
plugins: [pluginStyledComponents()],
},
});

Expand Down

0 comments on commit 4b6e507

Please sign in to comment.