microsoft / microsoft/TypeScript
please document project references and outdir
还没有人认领这个 Issue。
- 主要语言
- Go
- 星标
- 111k
- 派生
- 14.3k
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 132
描述
Really really unclear documentation regarding the behavior of "project references" and outDir.
I can't believe how unclear this is -- please please tell me how I'm supposed to do this ...
> checkmate-node-monorepo@0.0.1 build /Users/ncohen/software/itsacheckmate.com/Web
> tsc --build --verbose
[11:01:04 AM] Projects in this build:
* lib/pdf-api/tsconfig.json
* tsconfig.json
[11:01:04 AM] Project 'lib/pdf-api/tsconfig.json' is out of date because output file 'lib/pdf-api/src/DoordashFailureSamples.js' does not exist
[11:01:04 AM] Building project '/Users/ncohen/software/itsacheckmate.com/Web/lib/pdf-api/tsconfig.json'...
[11:01:07 AM] Project 'tsconfig.json' is out of date because oldest output 'lib/pdf-api/src/DoordashPdfSemantics.js' is older than newest input 'lib/pdf-api'
[11:01:07 AM] Building project '/Users/ncohen/software/itsacheckmate.com/Web/tsconfig.json'...
[11:01:09 AM] Updating unchanged output timestamps of project '/Users/ncohen/software/itsacheckmate.com/Web/tsconfig.json'...
ncohen@breathe-book ~/s/i/Web> cat tsconfig.json
{
"references": [{ "path": "./lib/pdf-api" }]
}
ncohen@breathe-book ~/s/i/Web> cat ./lib/pdf-api/tsconfig.json
{
"extends": "../../tsconfig_base.json",
"include": ["./src/**/*.ts"],
"exclude": ["node_modules"]
}
ncohen@breathe-book ~/s/i/Web> cat ./tsconfig_base.json
{
"compilerOptions": {
"composite": true,
"outDir": "compiled-js",
"target": "es2016",
"lib": ["es2016"],
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"experimentalDecorators": false,
"pretty": true,
"strict": true,
"strictFunctionTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"forceConsistentCasingInFileNames": true,
"strictNullChecks": true,
"declaration": true,
"declarationMap": true
}
}
Why are compiled files being written to ./lib/pdf-api/src/ directory? How can I have that NOT happen? Or if I have to have something written to my src directory (for some reason ...?) can I have only a single file written there which I can reliable gitignore ...?
ncohen@breathe-book ~/s/i/Web> tsc --version
Version 3.5.2
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在 TypeScript 3.5.2 上使用 tsconfig.json、lib/pdf-api/tsconfig.json 和 tsconfig_base.json 重现报告的 tsc --build --verbose 行为。结合这些配置阅读项目引用和 outDir 文档。完成标准是文档解释输出为何出现在 lib/pdf-api/src 下,并清楚描述控制或忽略生成文件的受支持方式。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- build-system, documentation
- Issue 类型
- 文档
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100