Skip to content

Commit d19cef1

Browse files
committed
feat: update deps and impl
1 parent 3bd8349 commit d19cef1

File tree

4 files changed

+1846
-892
lines changed

4 files changed

+1846
-892
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ npm install @deviltea/vue-router-middleware
1717

1818
```ts
1919
import { createRouter, createWebHistory } from 'vue-router'
20-
import { createHandleMiddlewares, defineMiddleware } from '@deviltea/vue-router-middleware'
20+
import { defineMiddleware, handleMiddlewares } from '@deviltea/vue-router-middleware'
2121

2222
const router = createRouter({
2323
history: createWebHistory(),
@@ -51,14 +51,13 @@ const router = createRouter({
5151
]
5252
})
5353

54-
router.beforeEach(createHandleMiddlewares())
54+
router.beforeEach(handleMiddlewares)
5555
```
5656

5757
## License
5858

5959
[MIT](./LICENSE) License © 2023-PRESENT [DevilTea](https://github.com/DevilTea)
6060

61-
6261
<!-- Badges -->
6362

6463
[npm-version-src]: https://img.shields.io/npm/v/@deviltea/vue-router-middleware?style=flat&colorA=080f12&colorB=1fa669

package.json

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
"dev": "unbuild --stub",
4545
"lint": "eslint .",
4646
"lint:fix": "eslint . --fix",
47-
"prepublishOnly": "nr build",
48-
"release": "bumpp && npm publish",
49-
"start": "esno src/index.ts",
47+
"prepublishOnly": "pnpm build",
48+
"release": "bumpp && pnpm publish",
49+
"start": "tsx src/index.ts",
5050
"test": "vitest",
5151
"test:cov": "vitest --coverage",
5252
"typecheck": "tsc --noEmit --project tsconfig.test.json",
@@ -57,24 +57,22 @@
5757
"vue-router": ">=4.0.0"
5858
},
5959
"devDependencies": {
60-
"@antfu/ni": "^0.21.12",
61-
"@deviltea/eslint-config": "^3.0.0",
62-
"@deviltea/tsconfig": "^0.0.5",
60+
"@deviltea/eslint-config": "3.4.1",
61+
"@deviltea/tsconfig": "0.0.6",
6362
"@types/node": "^20.10.1",
64-
"@vitest/coverage-v8": "^1.0.2",
65-
"bumpp": "^9.2.0",
66-
"eslint": "^8.54.0",
67-
"esno": "^4.0.0",
68-
"lint-staged": "^15.1.0",
69-
"pnpm": "^8.11.0",
70-
"rimraf": "^5.0.5",
71-
"simple-git-hooks": "^2.9.0",
72-
"typescript": "^5.3.3",
73-
"unbuild": "^2.0.0",
74-
"vite": "^5.0.4",
75-
"vitest": "^1.0.2",
76-
"vue": "^3.3.13",
77-
"vue-router": "^4.2.5"
63+
"@vitest/coverage-v8": "2.0.3",
64+
"bumpp": "9.2.1",
65+
"eslint": "8.57.0",
66+
"lint-staged": "15.2.7",
67+
"rimraf": "6.0.1",
68+
"simple-git-hooks": "2.11.1",
69+
"tsx": "4.16.2",
70+
"typescript": "5.4.5",
71+
"unbuild": "2.0.0",
72+
"vite": "5.3.4",
73+
"vitest": "2.0.3",
74+
"vue": "3.4.33",
75+
"vue-router": "4.4.0"
7876
},
7977
"simple-git-hooks": {
8078
"pre-commit": "pnpm lint-staged"

0 commit comments

Comments
 (0)