@devflow-tools/plugin-nextjs 0.8.10 → 0.8.11
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 +28 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @devflow-tools/plugin-nextjs
|
|
2
2
|
|
|
3
|
-
Next.js
|
|
3
|
+
Next.js 专家插件 — App Router、SSR/SSG/ISR、Server Components、Middleware、部署。
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -8,12 +8,34 @@ Next.js expert plugin for DevFlow — App Router, SSR/SSG/ISR, Server Components
|
|
|
8
8
|
npm install @devflow-tools/plugin-nextjs
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## MCP Tools
|
|
12
12
|
|
|
13
|
-
|
|
|
14
|
-
|
|
15
|
-
| `
|
|
16
|
-
| `
|
|
13
|
+
| Tool | 说明 | 关键参数 |
|
|
14
|
+
|------|------|---------|
|
|
15
|
+
| `nextjs_diagnose_bug` | Bug 诊断:错误类型 → 渲染层 → 构建配置 → 修复 | `projectRoot`, `errorMessage`, `stackTrace` |
|
|
16
|
+
| `nextjs_new_page` | 新建 Next.js 页面(路由 + 数据获取 + 渲染策略) | `pageName`, `route` |
|
|
17
|
+
|
|
18
|
+
## Knowledge Sources
|
|
19
|
+
|
|
20
|
+
| 来源 | URL | SPA |
|
|
21
|
+
|------|-----|-----|
|
|
22
|
+
| Next.js 官方文档 | https://nextjs.org/docs | Yes |
|
|
23
|
+
|
|
24
|
+
## Memory
|
|
25
|
+
|
|
26
|
+
插件自动注入以下最佳实践:
|
|
27
|
+
- App Router 优先于 Pages Router
|
|
28
|
+
- Server Components 默认,Client Components 用 `'use client'` 声明
|
|
29
|
+
- 数据获取优先使用 Server Components + `fetch()`
|
|
30
|
+
- 路由组(route groups)用 `(groupName)` 目录
|
|
31
|
+
- 图片必须使用 `next/image` 组件
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# 在 Claude Code 中使用
|
|
37
|
+
/devflow:nextjs 创建 about 页面
|
|
38
|
+
```
|
|
17
39
|
|
|
18
40
|
## License
|
|
19
41
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devflow-tools/plugin-nextjs",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "a0a0b61377aa88ebbd380f50a5d532f63175ef45"
|
|
30
30
|
}
|