openpetswithchatandmcp/website/analyze-runboard.ts
OpenPets Dev 65ac83849e Add 'website/' from commit '966aea480ffe1c340553aa878def30131d2af827'
git-subtree-dir: website
git-subtree-mainline: 8d3849caea
git-subtree-split: 966aea480f
2026-06-17 20:48:39 +00:00

10 lines
659 B
TypeScript
Executable file

import { Project, SyntaxKind } from 'ts-morph';
const project = new Project({ tsConfigFilePath: 'C:/ScriptoriumAI/scriptoriumai-ui/tsconfig.json' });
const sourceFile = project.getSourceFileOrThrow('C:/ScriptoriumAI/scriptoriumai-ui/src/pages/Runboard.tsx');
const functions = sourceFile.getFunctions().filter(f => f.getName() && f.getName().startsWith('Runboard') && f.getName() !== 'Runboard');
console.log('Sub-components Candidates in Runboard.tsx:');
functions.sort((a,b) => b.getEnd() - b.getStart() - (a.getEnd() - a.getStart())).slice(0, 15).forEach(f => {
console.log(f.getName(), 'Lines:', f.getEndLineNumber() - f.getStartLineNumber());
});