sfcs
v1.0.1
Published
A command-line tool for analyzing Vue Single File Components for structure and complexity.
Readme
SFCS - Single File Component Scanner
SFCS is a command-line tool designed to analyze Vue Single File Components (SFCs) for their structure and complexity, with a focus on migration readiness from Vue 2 to Vue 3. It helps developers understand the composition of their Vue components and provides insights into which files should be prioritized for migration to the Composition API.
Features
- Scans Vue components for Options API and Composition API usage.
- Analyzes migration readiness: The CLI focuses on analyzing migration from Vue 2 to Vue 3, specifically targeting Options API SFCs to understand which files should be prioritized for migration to the Composition API.
- Analyzes complexity based on various factors such as lifecycle hooks, computed properties, and more.
- Provides a detailed breakdown of components by complexity and module.
Installation
To use SFCS, clone the repository and install the dependencies:
npm installUsage
Basic Analysis
To perform a basic analysis of SFCs in a specified folder:
sfcs --folder=/path/to/projectComplexity Analysis
To enable detailed complexity analysis:
sfcs --folder=/path/to/project --complexityOptions
--folder=<path>: Specify the folder to scan (default: current directory).--blacklist=<dirs>: Comma-separated list of directories to ignore.--complexity: Enable complexity analysis.
License
This project is licensed under the ISC License.
