Skip to content

Commit 0a52435

Browse files
committed
refactor: 💡 upgrade deps
1 parent 85b0e96 commit 0a52435

7 files changed

Lines changed: 408 additions & 174 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ node_modules/
55

66
.idea/
77
.vscode/
8-
.DS_Store
8+
.DS_Store
9+
stats.html

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
dist
1+
dist
2+
stats.html

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Any draggable layout supported based muuri for react.
1313
- ✅ New technology enthusiasts, we will keep it updated if needed.
1414

1515
## Table of Content
16+
1617
- [Motivation](#motivation)
1718
- [Get Started](#get-started)
1819
- [Additional](#additional)
@@ -96,8 +97,9 @@ import { useRef } from 'react';
9697
```
9798

9899
## Examples
99-
- [React 17](https://codesandbox.io/s/ruuri-on-react17-pf1px5)
100100

101+
- [React 17](https://codesandbox.io/s/ruuri-on-react17-pf1px5)
101102

102103
## License
104+
103105
Copyright © 2022 vingeray Licensed under the [MIT license](https://github.com/vingeraycn/ruuri/blob/main/LICENSE).

package.json

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "ruuri",
33
"version": "0.1.4",
4-
"main": "./dist/ruuri.cjs.js",
5-
"module": "./dist/ruuri.es.js",
4+
"main": "./dist/index.cjs.js",
5+
"module": "./dist/index.es.js",
66
"types": "./dist/index.d.ts",
77
"keywords": [
88
"grid",
@@ -33,52 +33,55 @@
3333
],
3434
"scripts": {
3535
"prebuild": "rm -rf dist",
36-
"build": "yarn prebuild && vite build",
36+
"build": "vite build",
3737
"serve": "vite preview",
3838
"cz": "yarn format && git add . && git cz",
3939
"czp": "yarn cz && git push -u origin HEAD",
4040
"check-deps": "npx npm-check-updates",
41-
"upgrade-deps": "npx npm-check-updates -u && yarn",
41+
"upgrade-deps": "yarn check-deps -u && yarn",
4242
"lint": "prettier --check .",
4343
"format": "yarn lint --write",
4444
"prepare": "husky install",
4545
"postversion": "git push && git push --tags"
4646
},
4747
"dependencies": {},
4848
"devDependencies": {
49-
"@babel/core": "^7.17.9",
49+
"@babel/core": "^7.17.10",
5050
"@emotion/react": "^11.9.0",
5151
"@rollup/plugin-typescript": "^8.3.2",
5252
"@types/lodash-es": "^4.17.6",
53-
"@types/node": "^17.0.25",
54-
"@types/react": "^18.0.5",
55-
"@types/react-dom": "^18.0.1",
56-
"@typescript-eslint/eslint-plugin": "^5.20.0",
57-
"@typescript-eslint/parser": "^5.20.0",
58-
"@vitejs/plugin-react-refresh": "^1.3.6",
59-
"autoprefixer": "^10.4.4",
53+
"@types/node": "^17.0.31",
54+
"@types/react": "^18.0.8",
55+
"@types/react-dom": "^18.0.3",
56+
"@typescript-eslint/eslint-plugin": "^5.22.0",
57+
"@typescript-eslint/parser": "^5.22.0",
58+
"@vitejs/plugin-react": "^1.3.2",
59+
"autoprefixer": "^10.4.7",
6060
"clsx": "^1.1.1",
6161
"commitizen": "^4.2.4",
62-
"eslint": "^8.13.0",
62+
"eslint": "^8.14.0",
6363
"eslint-config-prettier": "^8.5.0",
6464
"eslint-plugin-import": "^2.26.0",
6565
"eslint-plugin-prettier": "^4.0.0",
6666
"eslint-plugin-react": "^7.29.4",
67-
"eslint-plugin-react-hooks": "^4.4.0",
67+
"eslint-plugin-react-hooks": "^4.5.0",
6868
"git-cz": "^4.8.0",
6969
"husky": "^7.0.4",
7070
"lodash-es": "^4.17.21",
7171
"muuri": "^0.9.5",
72-
"postcss": "^8.4.12",
72+
"postcss": "^8.4.13",
7373
"prettier": "^2.6.2",
7474
"prettier-plugin-organize-imports": "^2.3.4",
75-
"react": "^18.0.0",
76-
"react-dom": "^18.0.0",
77-
"stylelint": "^14.7.1",
75+
"react": "^18.1.0",
76+
"react-dom": "^18.1.0",
77+
"rollup": "^2.72.0",
78+
"rollup-plugin-visualizer": "^5.6.0",
79+
"stylelint": "^14.8.2",
7880
"stylelint-config-standard": "^25.0.0",
7981
"stylelint-prettier": "^2.0.0",
80-
"typescript": "^4.6.3",
81-
"vite": "^2.9.5"
82+
"tslib": "^2.4.0",
83+
"typescript": "^4.6.4",
84+
"vite": "^2.9.8"
8285
},
8386
"peerDependencies": {
8487
"muuri": "^0.9.5",

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@
2525
"@/*": ["src/*"]
2626
}
2727
},
28-
"include": ["**/*.ts", "**/*.tsx", "*.ts"],
29-
"exclude": ["vite.config.ts"]
28+
"include": ["**/*.ts", "**/*.tsx", "*.ts"]
3029
}

vite.config.ts

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
11
import typescript from '@rollup/plugin-typescript'
2-
import reactRefresh from '@vitejs/plugin-react-refresh'
2+
import react from '@vitejs/plugin-react'
33
import path from 'path'
4+
import visualize from 'rollup-plugin-visualizer'
45
import { defineConfig } from 'vite'
56
import pkg from './package.json'
67

78
// https://vitejs.dev/config/
89
export default defineConfig({
9-
plugins: [reactRefresh(), typescript()],
10+
plugins: [
11+
react(),
12+
typescript({
13+
tsconfig: 'tsconfig.json',
14+
rootDir: 'src',
15+
outDir: 'dist',
16+
}),
17+
visualize({
18+
brotliSize: true,
19+
gzipSize: true,
20+
}),
21+
],
1022
esbuild: {
1123
jsxFactory: 'jsx',
1224
jsxInject: `
@@ -19,9 +31,18 @@ export default defineConfig({
1931
name: pkg.name,
2032
formats: ['es', 'cjs'],
2133
entry: path.resolve(__dirname, 'src/index.ts'),
34+
fileName: 'index',
2235
},
2336
rollupOptions: {
2437
external: ['react', 'react-dom', 'muuri'],
38+
output: {
39+
exports: 'named',
40+
globals: {
41+
muuri: 'muuri',
42+
react: 'React',
43+
'react-dom': 'ReactDOM',
44+
},
45+
},
2546
},
2647
},
2748
})

0 commit comments

Comments
 (0)