microsoft / microsoft/TypeScript

Allow regular flags to mix with --build

Offen
#25,613 14 Kommentare 8 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

In Discussion Suggestion
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.3k
Ø Merge
1 T. 19 Std.
Gemergte PRs (30 T.)
117

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Führe den gemeldeten Befehl tsc --build tsconfig.json --outDir out --rootDir /home/kostya/proj/foo erneut aus und untersuche den Einstiegspunkt für die Argumentanalyse von --build. Die Aufgabe ist erledigt, wenn reguläre Flags als Compileroptionen akzeptiert werden, statt als Projektpfade behandelt zu werden, während Projektpfade weiterhin funktionieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
build-system, cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.