Skip to content

Commit 05665d9

Browse files
authored
v2: ensure scrollbars are updated when content changes (#65)
* migrate to pnpm * upgrade react to its latest version and add types * migrate to typescript * migrate to tsup * make sure scrollbars are updated when content changes * update example app to vite + typescript * publish version v2.0.0
1 parent 488ca42 commit 05665d9

29 files changed

+5937
-23167
lines changed

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16

example/.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

example/README.md

-2,164
This file was deleted.

example/index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/close.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>React Custom Scroller</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="./src/index.tsx"></script>
12+
</body>
13+
</html>

example/package.json

+19-14
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,25 @@
44
"version": "0.0.0",
55
"license": "MIT",
66
"private": true,
7-
"dependencies": {
8-
"react-custom-scroller": "./..",
9-
"react-scripts": "^3.2.0"
10-
},
7+
"type": "module",
118
"scripts": {
12-
"start": "react-scripts start",
13-
"build": "react-scripts build",
14-
"test": "react-scripts test --env=jsdom",
15-
"eject": "react-scripts eject",
16-
"prepare": "yarn build"
9+
"dev": "vite",
10+
"build": "tsc -b && vite build",
11+
"lint": "eslint .",
12+
"preview": "vite preview",
13+
"prepare": "pnpm build"
14+
},
15+
"dependencies": {
16+
"react": "^18.3.1",
17+
"react-dom": "^18.3.1",
18+
"react-custom-scroller": "2.0.0"
1719
},
18-
"browserslist": [
19-
">0.2%",
20-
"not dead",
21-
"not op_mini all"
22-
]
20+
"devDependencies": {
21+
"@types/react": "^18.3.12",
22+
"@types/react-dom": "^18.3.1",
23+
"@vitejs/plugin-react-swc": "^3.5.0",
24+
"globals": "^15.11.0",
25+
"typescript": "^5.7.2",
26+
"vite": "^5.4.10"
27+
}
2328
}

0 commit comments

Comments
 (0)