diff --git a/package-lock.json b/package-lock.json index 6a41b29c..099aad05 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30121,7 +30121,7 @@ }, "packages/muon": { "name": "@muonic/muon", - "version": "0.0.2-beta.48", + "version": "0.0.2-beta.49", "license": "ISC", "dependencies": { "@open-wc/building-rollup": "3.0.2", diff --git a/packages/muon/scripts/utils/index.mjs b/packages/muon/scripts/utils/index.mjs index b5b36fe9..0b067852 100644 --- a/packages/muon/scripts/utils/index.mjs +++ b/packages/muon/scripts/utils/index.mjs @@ -179,7 +179,7 @@ const getAliasPaths = (type) => { return undefined; }; -const sourceFilesAnalyzer = async () => { +const analyzeComponents = async () => { const files = await findComponents(); const paths = getAliasPaths('glob'); const options = { @@ -216,6 +216,15 @@ const sourceFilesAnalyzer = async () => { } })); + return { + results, + program + }; +}; + +const sourceFilesAnalyzer = async () => { + const { results, program } = await analyzeComponents(); + const tagNames = results?.map((result) => { const { tagName, prefix } = getTagFromAnalyzerResult(result); @@ -355,6 +364,7 @@ export { componentDefiner, componentImportExport, runner, + analyzeComponents, sourceFilesAnalyzer, getAliasPaths };