File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -212,6 +212,9 @@ function getProjectSync(pathOrSrcFile) {
212212 var cwdPath = path . relative ( process . cwd ( ) , path . dirname ( projectFile ) ) ;
213213 if ( ! projectSpec . files && ! projectSpec . filesGlob ) {
214214 var toExpand = invisibleFilesGlob ;
215+ if ( projectSpec . exclude ) {
216+ toExpand = toExpand . concat ( projectSpec . exclude . map ( function ( exclude ) { return '!' + exclude ; } ) ) ;
217+ }
215218 }
216219 if ( projectSpec . filesGlob ) {
217220 var toExpand = projectSpec . filesGlob ;
Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ interface UsefulFromPackageJson {
118118 */
119119interface TypeScriptProjectRawSpecification {
120120 compilerOptions ?: CompilerOptions ;
121+ exclude ?: string [ ] ; // optional: An array of 'glob / minimatch / RegExp' patterns to specify directories / files to exclude
121122 files ?: string [ ] ; // optional: paths to files
122123 filesGlob ?: string [ ] ; // optional: An array of 'glob / minimatch / RegExp' patterns to specify source files
123124 formatCodeOptions ?: formatting . FormatCodeOptions ; // optional: formatting options
@@ -384,6 +385,9 @@ export function getProjectSync(pathOrSrcFile: string): TypeScriptProjectFileDeta
384385 var cwdPath = path . relative ( process . cwd ( ) , path . dirname ( projectFile ) ) ;
385386 if ( ! projectSpec . files && ! projectSpec . filesGlob ) { // If there is no files and no filesGlob, we create an invisible one.
386387 var toExpand = invisibleFilesGlob ;
388+ if ( projectSpec . exclude ) {
389+ toExpand = toExpand . concat ( projectSpec . exclude . map ( ( exclude ) => '!' + exclude ) ) ;
390+ }
387391 }
388392 if ( projectSpec . filesGlob ) { // If there is a files glob we will use that
389393 var toExpand = projectSpec . filesGlob
You can’t perform that action at this time.
0 commit comments