Documentation
README
技术栈检测方法
适用场景
在进行技术选型、架构设计、代码生成前,需要先了解项目当前使用的技术栈,以便:
- 遵循项目现有的技术选择
- 生成符合项目规范的代码
- 避免引入不兼容的技术
检测方法
1. 检测配置文件
使用 Read 或 Glob 工具检测项目根目录的配置文件:
JavaScript/TypeScript 生态
| 文件 | 说明 | 检测内容 |
|---|---|---|
package.json |
Node.js 项目配置 | dependencies, devDependencies, scripts |
tsconfig.json |
TypeScript 配置 | 确认使用 TypeScript |
next.config.js |
Next.js 配置 | 确认使用 Next.js |
vite.config.js |
Vite 配置 | 确认使用 Vite |
nuxt.config.js |
Nuxt 配置 | 确认使用 Nuxt |
检测命令:
# 检测是否存在
ls package.json tsconfig.json next.config.js vite.config.js 2>/dev/null
# 读取 package.json
Read(file_path: "package.json")
This is the opening of the README. Read the full README on GitHub.