Make "exclude" default to empty if "include" is present.

This commit is contained in:
Andy Hanson
2016-11-18 06:55:03 -08:00
parent 9fec77551c
commit aa0d2ce2ee
2 changed files with 36 additions and 16 deletions

View File

@@ -951,8 +951,8 @@ namespace ts {
errors.push(createCompilerDiagnostic(Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));
}
else {
// By default, exclude common package folders and the outDir
excludeSpecs = ["node_modules", "bower_components", "jspm_packages"];
// If no includes were specified, exclude common package folders and the outDir
excludeSpecs = includeSpecs ? [] : ["node_modules", "bower_components", "jspm_packages"];
const outDir = json["compilerOptions"] && json["compilerOptions"]["outDir"];
if (outDir) {