1.0.1 • Published 1 year ago

react-component-graph v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

React Component Graph

A tool to generate a component interaction graph for React codebases.

Installation

To install the package globally using npm, run:

npm install -g react-component-graph

Usage

To generate a component interaction graph, run the following command:

react-component-graph --src /path/to/react/project

Options

  • -s, --src <directory>: Source directory of the React project.

Example

react-component-graph --src ./src

This command will generate a components.png file in the current directory, containing the component interaction graph.

Configuration

You can customize the behavior of the tool using the following options:

  • --output <file>: Specify the output file for the graph. Default is components.png.
  • --format <format>: Specify the output format for the graph (e.g., png, svg). Default is png.
  • --extensions <ext>: Specify the file extensions to scan (e.g., jsx, tsx). Default is jsx, tsx.

Example with Configuration Options

react-component-graph --src ./src --output graph.svg --format svg --extensions jsx,tsx

Performance

For large codebases, the tool is optimized to use asynchronous file operations and caching mechanisms to improve performance. Ensure your project structure is well-organized to benefit from these optimizations.

Contributing

Contributions are welcome! Please open issues and submit pull requests for any improvements or new features.

License

This project is licensed under the MIT License.

Author:

BR0K3Nreality Follow me on Github: https://github.com/BR0K3Nreality