bini-router 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +6 -3
- package/package.json +5 -9
package/Readme.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](./LICENSE)
|
|
7
7
|
[](https://vitejs.dev)
|
|
8
8
|
[](https://react.dev)
|
|
9
|
-
[](https://hono.dev)
|
|
10
10
|
[](https://www.typescriptlang.org)
|
|
11
11
|
[](https://github.com/binidu/bini-router/pulls)
|
|
12
12
|
|
|
@@ -35,9 +35,11 @@ Like Next.js — but pure SPA, zero server required.
|
|
|
35
35
|
## Install
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
npm install bini-router
|
|
38
|
+
npm install bini-router
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
> Hono is included — no need to install it separately.
|
|
42
|
+
|
|
41
43
|
---
|
|
42
44
|
|
|
43
45
|
## Setup
|
|
@@ -236,7 +238,8 @@ All fields are optional. `metadata` is stripped from the browser bundle automati
|
|
|
236
238
|
|
|
237
239
|
## API Routes
|
|
238
240
|
|
|
239
|
-
API handlers are pure Hono context handlers. Export a default Hono app or a single handler function.
|
|
241
|
+
API handlers are pure Hono context handlers. Export a default Hono app or a single handler function.
|
|
242
|
+
Hono is bundled with bini-router — import directly from `hono`.
|
|
240
243
|
|
|
241
244
|
```ts
|
|
242
245
|
// src/app/api/users.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bini-router",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "File-based routing, nested layouts, SSR and Hono-powered API routes for Vite",
|
|
5
5
|
"author": "bini.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,23 +23,19 @@
|
|
|
23
23
|
"files": [
|
|
24
24
|
"dist"
|
|
25
25
|
],
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"hono": "^4.12.5"
|
|
28
|
+
},
|
|
26
29
|
"peerDependencies": {
|
|
27
30
|
"vite": ">=5.0.0",
|
|
28
31
|
"react": ">=18.0.0",
|
|
29
32
|
"react-dom": ">=18.0.0",
|
|
30
|
-
"react-router-dom": ">=6.0.0"
|
|
31
|
-
"hono": ">=4.0.0"
|
|
32
|
-
},
|
|
33
|
-
"peerDependenciesMeta": {
|
|
34
|
-
"hono": {
|
|
35
|
-
"optional": true
|
|
36
|
-
}
|
|
33
|
+
"react-router-dom": ">=6.0.0"
|
|
37
34
|
},
|
|
38
35
|
"devDependencies": {
|
|
39
36
|
"@types/node": "^25.3.5",
|
|
40
37
|
"@types/react": "^19.2.14",
|
|
41
38
|
"@types/react-dom": "^19.2.3",
|
|
42
|
-
"hono": "^4.12.5",
|
|
43
39
|
"react": "^19.2.4",
|
|
44
40
|
"react-dom": "^19.2.4",
|
|
45
41
|
"react-router-dom": "^7.13.1",
|