File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
projects/npm-tools/packages/npm-scripts/src/typescript Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -87,17 +87,11 @@ function removeStaleFile(filepath, baseDir) {
8787 const sourceFileTS = sourceFileNoExt + '.ts' ;
8888 const sourceFileTSX = sourceFileNoExt + '.tsx' ;
8989
90- const sourceFileTSExists = fs . existsSync ( sourceFileTS ) ;
91-
92- if ( ! sourceFileTSExists && ! fs . existsSync ( sourceFileTSX ) ) {
93- const sourceFilePath = sourceFileTSExists
94- ? sourceFileTS
95- : sourceFileTSX ;
96-
90+ if ( ! fs . existsSync ( sourceFileTS ) && ! fs . existsSync ( sourceFileTSX ) ) {
9791 // eslint-disable-next-line no-console
98- console . log ( 'Source file does not exist. Removing: ' , sourceFilePath ) ;
92+ console . log ( 'Source file does not exist. Removing: ' , filepath ) ;
9993
100- fs . unlinkSync ( sourceFilePath ) ;
94+ fs . unlinkSync ( filepath ) ;
10195
10296 return true ;
10397 }
You can’t perform that action at this time.
0 commit comments