diff --git a/dist/main/tsconfig/tsconfig.js b/dist/main/tsconfig/tsconfig.js index 715c0d6f7..a49f2553f 100644 --- a/dist/main/tsconfig/tsconfig.js +++ b/dist/main/tsconfig/tsconfig.js @@ -212,6 +212,9 @@ function getProjectSync(pathOrSrcFile) { var cwdPath = path.relative(process.cwd(), path.dirname(projectFile)); if (!projectSpec.files && !projectSpec.filesGlob) { var toExpand = invisibleFilesGlob; + if (projectSpec.exclude) { + toExpand = toExpand.concat(projectSpec.exclude.map(function (exclude) { return '!' + exclude; })); + } } if (projectSpec.filesGlob) { var toExpand = projectSpec.filesGlob; diff --git a/lib/main/tsconfig/tsconfig.ts b/lib/main/tsconfig/tsconfig.ts index f582c0c81..51384d049 100644 --- a/lib/main/tsconfig/tsconfig.ts +++ b/lib/main/tsconfig/tsconfig.ts @@ -118,6 +118,7 @@ interface UsefulFromPackageJson { */ interface TypeScriptProjectRawSpecification { compilerOptions?: CompilerOptions; + exclude?: string[]; // optional: An array of 'glob / minimatch / RegExp' patterns to specify directories / files to exclude files?: string[]; // optional: paths to files filesGlob?: string[]; // optional: An array of 'glob / minimatch / RegExp' patterns to specify source files formatCodeOptions?: formatting.FormatCodeOptions; // optional: formatting options @@ -384,6 +385,9 @@ export function getProjectSync(pathOrSrcFile: string): TypeScriptProjectFileDeta var cwdPath = path.relative(process.cwd(), path.dirname(projectFile)); if (!projectSpec.files && !projectSpec.filesGlob) { // If there is no files and no filesGlob, we create an invisible one. var toExpand = invisibleFilesGlob; + if(projectSpec.exclude){ + toExpand = toExpand.concat(projectSpec.exclude.map((exclude) => '!' + exclude)); + } } if (projectSpec.filesGlob) { // If there is a files glob we will use that var toExpand = projectSpec.filesGlob