How tkskto/vue-component-analyzer works
Project type and purpose
• This is a developer tool—a CLI‐driven analyzer for Vue.js Single File Components (SFCs) that also spins up a simple server and a browser-based UI for visualizing component dependency trees and props.
• The README describes it as both a command-line utility and an embeddable API/library for building or testing your own tools.
File structure
• Top-level:
• bin/analyze.js – the CLI entry point (uses Commander or similar)
• src/server – the core analyzer engine and HTTP server (parses files, builds a model, renders via EJS)
• src/client – the browser app (TypeScript, DOM renderer, view switchers, style)
• views – EJS templates for server-side rendering of HTML pages
• rollup.config.mjs – build/bundle configuration
• package.json, tsconfigs, jest.config.js, eslint.config.js – build/test lint pipelines
• Tests and fixtures under test/ ensure parser correctness and CLI behavior. Types in types/ describe public API.
README for additional insights
• CLI options: --dir, --format, --out, --port – point to how the CLI orchestrates analysis and output.
• API export getImportDeclarationTree – shows the analyzer core can be used programmatically.
• Outputs: interactive “browser” UI, JSON, or HTML report.