Skip to content

Commit e397f7e

Browse files
Merge pull request #1051 from bryceosterhaus/master
fix(npm-scripts): remove type file instead of source file, which didn't even exist in the first place
2 parents 4575d4d + 3947c0c commit e397f7e

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

projects/npm-tools/packages/npm-scripts/src/config/npmscripts.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ module.exports = {
396396
'portal-workflow-web',
397397
'portlet-configuration-css-web',
398398
'portlet-configuration-web',
399+
'poshi-language-support',
399400
'product-navigation-applications-menu',
400401
'product-navigation-control-menu',
401402
'product-navigation-control-menu-web',

projects/npm-tools/packages/npm-scripts/src/typescript/runTSC.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)