Skip to content

Commit

Permalink
chore: update playground
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Dec 11, 2024
1 parent a66c9e2 commit 8a3c117
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ npm add rsbuild-plugin-publint -D
Add plugin to your `rsbuild.config.ts`:

```ts
// rsbuild.config.ts
// `rslib.config.ts` or `rsbuild.config.ts`
import { pluginPublint } from "rsbuild-plugin-publint";

export default {
Expand All @@ -39,7 +39,7 @@ export default {

### publintOptions

Options for publint.
Options for publint. See [publint - API](https://github.com/bluwy/publint/blob/master/pkg/README.md#api) for more details.

- Type: `import('publint').Options`
- Default:
Expand All @@ -55,9 +55,7 @@ const defaultOptions = {
```js
pluginPublint({
publintOptions: {
rules: {
level: "error",
},
level: "error",
},
});
```
Expand Down
14 changes: 12 additions & 2 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
"name": "playground",
"private": true,
"version": "0.0.0",
"repository": {
"type": "git",
"url": "[email protected]:test/test.git"
},
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"scripts": {
"dev": "npx rsbuild dev",
"build": "npx rsbuild build"
"dev": "npx rslib build -w",
"build": "npx rslib build"
}
}
3 changes: 2 additions & 1 deletion playground/rsbuild.config.ts → playground/rslib.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from '@rsbuild/core';
import { defineConfig } from '@rslib/core';
import { pluginPublint } from '../src';

export default defineConfig({
plugins: [pluginPublint()],
lib: [{ format: 'esm' }],
});
7 changes: 1 addition & 6 deletions playground/src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
import './index.css';

document.querySelector('#root').innerHTML = `
<div class="content">
<h1>Vanilla Rsbuild</h1>
<p>Start building amazing things with Rsbuild.</p>
</div>
`;
export default 'hello world!';

0 comments on commit 8a3c117

Please sign in to comment.