Skip to content

Commit

Permalink
Merge pull request #572 from centrica-engineering/script/split-analyser
Browse files Browse the repository at this point in the history
Script/split-analyser
  • Loading branch information
MekalaNagarajan-Centrica authored Dec 1, 2023
2 parents 01b79f3 + d58f667 commit b140999
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion packages/muon/scripts/utils/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const getAliasPaths = (type) => {
return undefined;
};

const sourceFilesAnalyzer = async () => {
const analyzeComponents = async () => {
const files = await findComponents();
const paths = getAliasPaths('glob');
const options = {
Expand Down Expand Up @@ -218,6 +218,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);

Expand Down Expand Up @@ -357,6 +366,7 @@ export {
componentDefiner,
componentImportExport,
runner,
analyzeComponents,
sourceFilesAnalyzer,
getAliasPaths
};

0 comments on commit b140999

Please sign in to comment.