microsoft / microsoft/TypeScript
Allow regular flags to mix with --build
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
TypeScript Version: 3.0.0-rc, 3.0.0-dev.20180712
Search Terms:
build mode, --build
Code
I have project with the following tsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"target": "es2017",
"lib": ["es2017"],
"strict": true,
"sourceMap": true,
"noEmitOnError": true,
"types": ["node"]
},
"include": [
"src/**/*.ts"
]
}
and compile it with command:
node_modules/.bin/tsc --build tsconfig.json --outDir out --rootDir /home/kostya/proj/foo
Note, that outDir and rootDir options come from command line arguments, because I want to share output directory for another command (clean).
Expected behavior:
outDir and rootDir options will be took from command line.
Actual behavior:
Compiler ignores this options:
node_modules/.bin/tsc --build tsconfig.json --outDir out --rootDir /home/kostya/proj/foo
message TS6096: File '/home/kostya/proj/foo/--outDir' does not exist.
message TS6096: File '/home/kostya/proj/foo/out' does not exist.
message TS6096: File '/home/kostya/proj/foo/--rootDir' does not exist.
Playground Link:
Related Issues: https://github.com/Microsoft/TypeScript/issues/25600
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported tsc --build tsconfig.json --outDir out --rootDir /home/kostya/proj/foo command and inspect the --build argument parsing entry point. Done means regular flags are accepted as compiler options instead of being treated as project paths, while project paths still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100