Skip to content

Commit 8dbaf62

Browse files
committed
fix(tsconfig) support outFile same as out
closes #633
1 parent 02e1925 commit 8dbaf62

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

dist/main/tsconfig/tsconfig.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ var compilerOptionsValidation = {
3232
noLibCheck: { type: types.boolean },
3333
noResolve: { type: types.boolean },
3434
out: { type: types.string },
35+
outFile: { type: types.string },
3536
outDir: { type: types.string },
3637
preserveConstEnums: { type: types.boolean },
3738
removeComments: { type: types.boolean },
@@ -142,6 +143,9 @@ function rawToTsCompilerOptions(jsonOptions, projectDir) {
142143
if (compilerOptions.out !== undefined) {
143144
compilerOptions.out = path.resolve(projectDir, compilerOptions.out);
144145
}
146+
if (compilerOptions.outFile !== undefined) {
147+
compilerOptions.out = path.resolve(projectDir, compilerOptions.outFile);
148+
}
145149
return compilerOptions;
146150
}
147151
function tsToRawCompilerOptions(compilerOptions) {

lib/main/tsconfig/tsconfig.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ interface CompilerOptions {
4646
noLibCheck?: boolean;
4747
noResolve?: boolean;
4848
out?: string;
49+
outFile?: string; // new name for out
4950
outDir?: string; // Redirect output structure to this directory
5051
preserveConstEnums?: boolean;
5152
removeComments?: boolean; // Do not emit comments in output
@@ -89,6 +90,7 @@ var compilerOptionsValidation: simpleValidator.ValidationInfo = {
8990
noLibCheck: { type: types.boolean },
9091
noResolve: { type: types.boolean },
9192
out: { type: types.string },
93+
outFile: { type: types.string },
9294
outDir: { type: types.string },
9395
preserveConstEnums: { type: types.boolean },
9496
removeComments: { type: types.boolean },
@@ -291,6 +293,11 @@ function rawToTsCompilerOptions(jsonOptions: CompilerOptions, projectDir: string
291293
if (compilerOptions.out !== undefined) {
292294
compilerOptions.out = path.resolve(projectDir, compilerOptions.out);
293295
}
296+
297+
if (compilerOptions.outFile !== undefined) {
298+
// Till out is removed. Support outFile by just copying it to `out`
299+
compilerOptions.out = path.resolve(projectDir, compilerOptions.outFile);
300+
}
294301

295302
return compilerOptions;
296303
}

0 commit comments

Comments
 (0)