feat: 补充构建配置,实现 Claude Code 源码编译
添加缺失的项目配置文件,使源码快照可以成功编译和运行: - package.json: 85+ 依赖项 + 构建脚本 - tsconfig.json: TypeScript + JSX + src/ 路径别名 - globals.d.ts: MACRO 构建常量 + bun:bundle 类型声明 - scripts/build.ts: Bun 构建脚本(feature flag polyfill + MACRO 注入 + 内部包 stub + 缺失源文件自动 stub) - BUILD_GUIDE.md: 中文编译文档 - 修 Commander.js v13 的 -d2e 短标志兼容问题 构建脚本通过 missingSourceStubPlugin 插件自动检测并 stub 缺失的源文件, 无需在源码树中手动创建 stub 文件。 构建结果:dist/cli.js (11.7 MB),CLI 可正常启动并显示交互式终端 UI。 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
liuzenghui
co-authored by
Copilot
parent
16a676ffa3
commit
83fb08926d
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"jsx": "react-jsx",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"allowImportingTsExtensions": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"sourceMap": true,
|
||||
"lib": ["ESNext"],
|
||||
"types": ["bun-types", "node"],
|
||||
"paths": {
|
||||
"src/*": ["./src/*"]
|
||||
},
|
||||
"baseUrl": ".",
|
||||
"rootDir": "."
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.tsx", "scripts/**/*.ts", "globals.d.ts"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
Reference in New Issue
Block a user