Skip to content

Commit 4f98aad

Browse files
committed
chore: address review feedback
1 parent 0eef85c commit 4f98aad

6 files changed

Lines changed: 16 additions & 13 deletions

File tree

.github/workflows/surge-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Build preview
3232
if: ${{ steps.surge-token.outputs.enabled == 'true' }}
3333
run: |
34-
npm install
34+
ut install
3535
npm run build
3636
- uses: afc163/surge-preview@bf90a5a86111f6311ca42f0a5a0f80fb0fb03cec
3737
if: ${{ steps.surge-token.outputs.enabled == 'true' }}

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</p>
1414
</div>
1515

16-
<p align="center">English | [简体中文](./README.zh-CN.md)</p>
16+
<p align="center">English | <a href="./README.zh-CN.md">简体中文</a></p>
1717

1818
## Highlights
1919

@@ -54,7 +54,7 @@ domAlign(sourceNode, targetNode, {
5454
## Development
5555

5656
```bash
57-
npm install
57+
ut install
5858
npm start
5959
npm test
6060
npm run lint
@@ -74,8 +74,6 @@ The release flow is handled by `@rc-component/np` through the `rc-np` command wh
7474

7575
## Detailed API
7676

77-
## API
78-
7977
### void domAlign(source: HTMLElement, target: HTMLElement, alignConfig: Object):Function
8078

8179
#### alignConfig object details
@@ -140,8 +138,8 @@ The release flow is handled by `@rc-component/np` through the `rc-np` command wh
140138
## Development
141139

142140
```
143-
pnpm install
144-
pnpm start
141+
ut install
142+
npm start
145143
```
146144

147145
## Example

README.zh-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</p>
1414
</div>
1515

16-
<p align="center">简体中文 | [English](./README.md)</p>
16+
<p align="center">简体中文 | <a href="./README.md">English</a></p>
1717

1818
## 亮点
1919

@@ -54,7 +54,7 @@ domAlign(sourceNode, targetNode, {
5454
## 本地开发
5555

5656
```bash
57-
npm install
57+
ut install
5858
npm start
5959
npm test
6060
npm run lint

docs/shadow-dom.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,15 @@ export default () => {
4343
useEffect(() => {
4444
const div = document.createElement('div');
4545
const shadowRoot = div.attachShadow({ mode: 'open' });
46+
const root = createRoot(shadowRoot);
47+
4648
divRef.current.appendChild(div);
47-
createRoot(shadowRoot).render(<Test />);
49+
root.render(<Test />);
50+
51+
return () => {
52+
root.unmount();
53+
div.remove();
54+
};
4855
}, []);
4956
return <div ref={divRef} />;
5057
};

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"nyc": {
3838
"exclude": [
3939
"**/node_modules/**/*",
40-
"**/.pnpm/**/*",
4140
"**/cypress/**/*"
4241
],
4342
"excludeAfterRemap": true,
@@ -71,7 +70,6 @@
7170
"swc-plugin-coverage-instrument": "0.0.21",
7271
"typescript": "~5.5.4"
7372
},
74-
"packageManager": "pnpm@8.9.0",
7573
"engines": {
7674
"node": ">=14.x"
7775
},

vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"framework": "umijs",
3-
"installCommand": "npm install",
3+
"installCommand": "ut install",
44
"buildCommand": "npm run build",
55
"outputDirectory": ".doc"
66
}

0 commit comments

Comments
 (0)