From f9491bb94467f4ed090c11463de5bd15c462a9b2 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Tue, 13 Jul 2021 16:43:18 -0400 Subject: [PATCH] simplify component gathering --- scripts/make-vscode-data.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/make-vscode-data.js b/scripts/make-vscode-data.js index a0c06eec6..f3c42395b 100644 --- a/scripts/make-vscode-data.js +++ b/scripts/make-vscode-data.js @@ -12,14 +12,12 @@ function getAllComponents() { const allComponents = []; metadata.modules.map(module => { - module.exports.map(ex => { - if (ex.kind === 'custom-element-definition') { - const tagName = ex.name; - const className = ex.declaration.name; - const component = module?.declarations.find(dec => dec.name === 'default'); + module.declarations?.map(declaration => { + if (declaration.customElement) { + const component = declaration; if (component) { - allComponents.push(Object.assign(component, { className, tagName })); + allComponents.push(component); } } });