Skip to content

Commit ac35c3b

Browse files
committed
docs: update
1 parent 162e616 commit ac35c3b

6 files changed

Lines changed: 560 additions & 567 deletions

File tree

docs/adapters/initiate.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ const devtools = initDevframe(myDevframe, { base: '/__my-tool/' })
1919
::: code-group
2020

2121
```ts [Vite]
22+
// vite.config.ts
23+
// connect-style middleware + Vite's own server for the socket
2224
import { initDevframe } from 'devframe/initiate'
23-
// vite.config.ts — connect-style middleware + Vite's own server for the socket
2425
import { defineConfig } from 'vite'
2526
import myDevframe from './devframe'
2627

@@ -40,7 +41,8 @@ export default defineConfig({
4041
```
4142

4243
```ts [Nitro]
43-
// routes/__my-tool/[...path].ts — plus routes/__my-tool/index.ts (same body)
44+
// routes/__my-tool/[...path].ts
45+
// routes/__my-tool/index.ts
4446
// for the namespace root, since a catch-all doesn't match its own empty path.
4547
import { defineHandler } from 'nitro'
4648
import { devtools } from '../../devtools'
@@ -49,7 +51,8 @@ export default defineHandler(event => devtools.handler(event.req))
4951
```
5052

5153
```ts [Hono]
52-
// server.ts — `serve()` hands back the node server the socket rides on
54+
// server.ts
55+
// `serve()` hands back the node server the socket rides on
5356
import { serve } from '@hono/node-server'
5457
import { Hono } from 'hono'
5558
import { devtools } from './devtools'
@@ -60,9 +63,9 @@ devtools.attach(serve({ fetch: app.fetch, port: 3000 }))
6063
```
6164

6265
```ts [Next.js]
66+
// app/%5F_my-tool/[[...path]]/route.ts
67+
// Next reserves `_`-prefixed folders, so the segment is URL-encoded (`%5F_` decodes to `__`).
6368
import { initDevframe } from 'devframe/initiate'
64-
// app/%5F_my-tool/[[...path]]/route.ts — Next reserves `_`-prefixed
65-
// folders, so the segment is URL-encoded (`%5F_` decodes to `__`).
6669
import myDevframe from '@/devframe'
6770

6871
export const runtime = 'nodejs'

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"mermaid": "catalog:docs",
1313
"tinyglobby": "catalog:deps",
1414
"vitepress": "catalog:docs",
15+
"vitepress-plugin-group-icons": "catalog:docs",
1516
"vitepress-plugin-mermaid": "catalog:docs"
1617
}
1718
}

docs/vite.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { defineConfig } from 'vite'
2+
import { groupIconVitePlugin } from 'vitepress-plugin-group-icons'
3+
4+
export default defineConfig({
5+
plugins: [
6+
groupIconVitePlugin(),
7+
],
8+
})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "module",
44
"version": "0.9.1",
55
"private": true,
6-
"packageManager": "pnpm@11.21.0",
6+
"packageManager": "pnpm@11.22.0",
77
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
88
"license": "MIT",
99
"funding": "https://github.com/sponsors/antfu",

0 commit comments

Comments
 (0)