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) {
212
212
var cwdPath = path . relative ( process . cwd ( ) , path . dirname ( projectFile ) ) ;
213
213
if ( ! projectSpec . files && ! projectSpec . filesGlob ) {
214
214
var toExpand = invisibleFilesGlob ;
215
+ if ( projectSpec . exclude ) {
216
+ toExpand = toExpand . concat ( projectSpec . exclude . map ( function ( exclude ) { return '!' + exclude ; } ) ) ;
217
+ }
215
218
}
216
219
if ( projectSpec . filesGlob ) {
217
220
var toExpand = projectSpec . filesGlob ;
Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ interface UsefulFromPackageJson {
118
118
*/
119
119
interface TypeScriptProjectRawSpecification {
120
120
compilerOptions ?: CompilerOptions ;
121
+ exclude ?: string [ ] ; // optional: An array of 'glob / minimatch / RegExp' patterns to specify directories / files to exclude
121
122
files ?: string [ ] ; // optional: paths to files
122
123
filesGlob ?: string [ ] ; // optional: An array of 'glob / minimatch / RegExp' patterns to specify source files
123
124
formatCodeOptions ?: formatting . FormatCodeOptions ; // optional: formatting options
@@ -384,6 +385,9 @@ export function getProjectSync(pathOrSrcFile: string): TypeScriptProjectFileDeta
384
385
var cwdPath = path . relative ( process . cwd ( ) , path . dirname ( projectFile ) ) ;
385
386
if ( ! projectSpec . files && ! projectSpec . filesGlob ) { // If there is no files and no filesGlob, we create an invisible one.
386
387
var toExpand = invisibleFilesGlob ;
388
+ if ( projectSpec . exclude ) {
389
+ toExpand = toExpand . concat ( projectSpec . exclude . map ( ( exclude ) => '!' + exclude ) ) ;
390
+ }
387
391
}
388
392
if ( projectSpec . filesGlob ) { // If there is a files glob we will use that
389
393
var toExpand = projectSpec . filesGlob
You can’t perform that action at this time.
0 commit comments