!3401 check card 优化

Merge pull request !3401 from Bo Jiang/master
This commit is contained in:
openharmony_ci 2024-06-03 11:33:43 +00:00 committed by Gitee
commit d2606177fa
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -89,9 +89,7 @@ export function etsChecker() {
const logger = this.share.getLogger('etsChecker');
const rootFileNames: string[] = [];
const resolveModulePaths: string[] = [];
Object.values(projectConfig.entryObj).forEach((fileName: string) => {
rootFileNames.push(path.resolve(fileName));
});
rootFileNamesCollect(rootFileNames);
if (this.share && this.share.projectConfig && this.share.projectConfig.resolveModulePaths &&
Array.isArray(this.share.projectConfig.resolveModulePaths)) {
resolveModulePaths.push(...this.share.projectConfig.resolveModulePaths);
@ -133,3 +131,9 @@ export function etsChecker() {
};
}
function rootFileNamesCollect(rootFileNames: string[]): void {
const entryFiles: string[] = projectConfig.widgetCompile ? Object.values(projectConfig.cardEntryObj) : Object.values(projectConfig.entryObj);
entryFiles.forEach((fileName: string) => {
rootFileNames.push(path.resolve(fileName));
});
}