revert breaking changes

This commit is contained in:
Zhengbo Li
2016-01-20 16:53:15 -08:00
parent b5ed7f3eda
commit d64b603e4b
3 changed files with 21 additions and 20 deletions

View File

@@ -493,8 +493,7 @@ namespace ts {
* @param basePath A root directory to resolve relative path entries in the config
* file to. e.g. outDir
*/
export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, configFileName: string, existingOptions: CompilerOptions = {}): ParsedCommandLine {
const basePath = getDirectoryPath(configFileName);
export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions: CompilerOptions = {}, configFileName?: string): ParsedCommandLine {
const { options: optionsFromJsonConfigFile, errors } = convertCompilerOptionsFromJson(json["compilerOptions"], basePath, configFileName);
const options = extend(existingOptions, optionsFromJsonConfigFile);
@@ -524,7 +523,7 @@ namespace ts {
for (const extension of supportedExtensions) {
const filesInDirWithExtension = host.readDirectory(basePath, extension, exclude);
for (const fileName of filesInDirWithExtension) {
// .ts extension would read the .d.ts extension files too but since .d.ts is lower priority extension,
// .ts extension would read the .d.ts extension files too but since .d.ts is lower priority extension,
// lets pick them when its turn comes up
if (extension === ".ts" && fileExtensionIs(fileName, ".d.ts")) {
continue;