Skip to content

Commit 8f080a3

Browse files
committed
chore: update the test suite name
1 parent 5e5b639 commit 8f080a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1056
-33
lines changed

.prettierignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@ doc_build
77
**/*.js
88
**/*.ts
99
**/*.jsx
10-
**/*.tsx
10+
**/*.tsx
11+
12+
# ignore pnpm-lock
13+
pnpm-lock.yaml

biome.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
"enabled": false
3535
}
3636
},
37+
"css": {
38+
"formatter": {
39+
"enabled": false
40+
}
41+
},
3742
"linter": {
3843
"enabled": true,
3944
"ignore": ["./tests/integration/**/*/src/*"],
File renamed without changes.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "@examples/react-component-bundle-false",
3+
"private": true,
4+
"main": "./dist/cjs/index.js",
5+
"module": "./dist/esm/index.mjs",
6+
"types": "./dist/cjs/index.d.ts",
7+
"scripts": {
8+
"build": "rslib build"
9+
},
10+
"devDependencies": {
11+
"@rsbuild/plugin-react": "^1.0.2",
12+
"@rsbuild/plugin-sass": "^1.0.1",
13+
"@rslib/core": "workspace:*",
14+
"@types/react": "^18.3.5",
15+
"react": "^18.3.1"
16+
},
17+
"peerDependencies": {
18+
"react": "*"
19+
}
20+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { pluginReact } from '@rsbuild/plugin-react';
2+
import { pluginSass } from '@rsbuild/plugin-sass';
3+
import { type LibConfig, defineConfig } from '@rslib/core';
4+
5+
const shared: LibConfig = {
6+
bundle: false,
7+
dts: {
8+
bundle: false,
9+
},
10+
};
11+
12+
export default defineConfig({
13+
source: {
14+
entry: {
15+
index: ['./src/**', '!./src/env.d.ts'],
16+
},
17+
},
18+
lib: [
19+
{
20+
...shared,
21+
format: 'esm',
22+
output: {
23+
distPath: {
24+
root: './dist/esm',
25+
},
26+
},
27+
},
28+
{
29+
...shared,
30+
format: 'cjs',
31+
output: {
32+
distPath: {
33+
root: './dist/cjs',
34+
},
35+
},
36+
},
37+
],
38+
plugins: [pluginReact(), pluginSass()],
39+
});
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.button {
2+
background: yellow;
3+
}

examples/react-component/src/CounterButton.tsx renamed to examples/react-component-bundle-false/src/components/CounterButton/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import styles from './index.module.scss';
12
interface CounterButtonProps {
23
onClick: () => void;
34
label: string;
@@ -7,7 +8,7 @@ export const CounterButton: React.FC<CounterButtonProps> = ({
78
onClick,
89
label,
910
}) => (
10-
<button type="button" onClick={onClick}>
11+
<button type="button" className={styles.button} onClick={onClick}>
1112
{label}
1213
</button>
1314
);
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module '*.module.scss' {
2+
const classes: { [key: string]: string };
3+
export default classes;
4+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.counter-text {
2+
font-size: 50px;
3+
}

examples/react-component/src/index.tsx renamed to examples/react-component-bundle-false/src/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import { CounterButton } from './CounterButton';
1+
import { CounterButton } from './components/CounterButton/index';
22
import { useCounter } from './useCounter';
3+
import './index.scss';
34

45
export const Counter: React.FC = () => {
56
const { count, increment, decrement } = useCounter();
67

78
return (
89
<div>
9-
<h2>Counter: {count}</h2>
10+
<h2 className="counter-text">Counter: {count}</h2>
1011
<CounterButton onClick={decrement} label="-" />
1112
<CounterButton onClick={increment} label="+" />
1213
</div>

0 commit comments

Comments
 (0)