mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 20:19:13 +00:00
18 lines
359 B
JavaScript
18 lines
359 B
JavaScript
export function getAllComponents(metadata) {
|
|
const allComponents = [];
|
|
|
|
metadata.modules.map(module => {
|
|
module.declarations?.map(declaration => {
|
|
if (declaration.customElement) {
|
|
const component = declaration;
|
|
|
|
if (component) {
|
|
allComponents.push(component);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
return allComponents;
|
|
}
|