kopia lustrzana https://github.com/shoelace-style/shoelace
				
				
				
			
		
			
				
	
	
		
			19 wiersze
		
	
	
		
			430 B
		
	
	
	
		
			JavaScript
		
	
	
			
		
		
	
	
			19 wiersze
		
	
	
		
			430 B
		
	
	
	
		
			JavaScript
		
	
	
export function getAllComponents(metadata) {
 | 
						|
  const allComponents = [];
 | 
						|
 | 
						|
  metadata.modules.map(module => {
 | 
						|
    module.declarations?.map(declaration => {
 | 
						|
      if (declaration.customElement) {
 | 
						|
        const component = declaration;
 | 
						|
        const modulePath = module.path;
 | 
						|
 | 
						|
        if (component) {
 | 
						|
          allComponents.push(Object.assign(component, { modulePath }));
 | 
						|
        }
 | 
						|
      }
 | 
						|
    });
 | 
						|
  });
 | 
						|
 | 
						|
  return allComponents;
 | 
						|
}
 |