Skip to content

Commit 174a172

Browse files
committed
test(tsconfig): add testing validation for angular related tsconfig by adding testing the ngx subfolders
ISSUES CLOSED: #541
1 parent f14b258 commit 174a172

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

test.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,24 @@ do
127127
logDebug "run command \"npx --yes -p typescript@${TSCONFIG_VERSION} -c 'tsc -p ${TEMP_CONFIG_TSCONFIG}'\""
128128
npx --yes -p typescript@${TSCONFIG_VERSION} -c "tsc -p ${TEMP_CONFIG_TSCONFIG}"
129129
ghActionsGroupEnd "validate tsconfig ${TSCONFIG_VERSION}"
130+
131+
# Check for ng subfolders and validate them
132+
if [ $(ls ${tsconfigFolder}/${TSCONFIG_VERSION} | grep "^ng" | wc -l) != 0 ]; then
133+
NG_SUBFOLDERS=($(ls ${tsconfigFolder}/${TSCONFIG_VERSION} | grep "^ng"))
134+
if [ ${#NG_SUBFOLDERS[@]} -gt 0 ]; then
135+
logDebug "Found ng subfolders: ${NG_SUBFOLDERS[*]}"
136+
for NG_SUBFOLDER in ${NG_SUBFOLDERS[@]}
137+
do
138+
ghActionsGroupStart "validate tsconfig ${TSCONFIG_VERSION}/${NG_SUBFOLDER}" "no-xtrace"
139+
TEMP_CONFIG_TSCONFIG_NG="${testFolder}/tsconfig-test-file-${TSCONFIG_VERSION}-${NG_SUBFOLDER}.json"
140+
logDebug "create temporary tsconfig file: ${TEMP_CONFIG_TSCONFIG_NG}"
141+
echo "{\"extends\":\"../../lib/tsconfig/${TSCONFIG_VERSION}/${NG_SUBFOLDER}/tsconfig.json\",\"compilerOptions\":{\"baseUrl\":\".\"}}" > ${TEMP_CONFIG_TSCONFIG_NG}
142+
logDebug "run command \"npx --yes -p typescript@${TSCONFIG_VERSION} -c 'tsc -p ${TEMP_CONFIG_TSCONFIG_NG}'\""
143+
npx --yes -p typescript@${TSCONFIG_VERSION} -c "tsc -p ${TEMP_CONFIG_TSCONFIG_NG}"
144+
ghActionsGroupEnd "validate tsconfig ${TSCONFIG_VERSION}/${NG_SUBFOLDER}"
145+
done
146+
fi
147+
fi
130148
done
131149

132150
#ghActionsGroupEnd "validate tsconfig configurations"

0 commit comments

Comments
 (0)