Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit 4e6e372

Browse files
committed
chore(generators): allow multiple component types in getNgModules
1 parent 78ccdd3 commit 4e6e372

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/generators/util.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,10 @@ function createDirAndWriteFile(filePath: string, fileContent: string) {
8686
});
8787
}
8888

89-
export function getNgModules(context: BuildContext, type: string): Promise<GlobResult[]> {
89+
export function getNgModules(context: BuildContext, types: string[]): Promise<GlobResult[]> {
9090
const ngModuleSuffix = getStringPropertyValue(Constants.ENV_NG_MODULE_FILE_NAME_SUFFIX);
91-
const genDir = getDirToWriteToByType(context, type);
92-
93-
return globAll([join(genDir, '**', `*${ngModuleSuffix}`)]);
91+
const patterns = types.map((type) => join(getDirToWriteToByType(context, type), '**', `*${ngModuleSuffix}`));
92+
return globAll(patterns);
9493
}
9594

9695
export function getDirToWriteToByType(context: BuildContext, type: string) {

0 commit comments

Comments
 (0)