File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1108,6 +1108,10 @@ private boolean hasTypeScriptFiles(Set<Path> filesToExtract) {
11081108 return false ;
11091109 }
11101110
1111+ public static boolean treatAsTSConfig (String basename ) {
1112+ return basename .contains ("tsconfig." ) && basename .endsWith (".json" );
1113+ }
1114+
11111115 private void findFilesToExtract (
11121116 FileExtractor extractor , final Set <Path > filesToExtract , final List <Path > tsconfigFiles )
11131117 throws IOException {
@@ -1140,7 +1144,7 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
11401144
11411145 // extract TypeScript projects from 'tsconfig.json'
11421146 if (typeScriptMode == TypeScriptMode .FULL
1143- && (file .getFileName ().toString (). contains ( "tsconfig." ) && file . getFileName (). toString (). endsWith ( ".json" ))
1147+ && treatAsTSConfig (file .getFileName ().toString ())
11441148 && !excludes .contains (file )
11451149 && isFileIncluded (file )) {
11461150 tsconfigFiles .add (file );
Original file line number Diff line number Diff line change @@ -539,7 +539,7 @@ private void collectFiles(File root, boolean explicit) {
539539 }
540540
541541 if (extractorConfig .getTypeScriptMode () == TypeScriptMode .FULL
542- && root .getName (). equals ( "tsconfig.json" )
542+ && AutoBuild . treatAsTSConfig ( root .getName ())
543543 && !excludeMatcher .matches (path )) {
544544 projectFiles .add (root );
545545 }
You can’t perform that action at this time.
0 commit comments