-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependency cruiser #1869
Dependency cruiser #1869
Conversation
Is it LLM generated description of PR ? |
I don't like the idea of putting large SVG files with generated stuff here. then if properly digested by mkdocs this should be visible here: |
@jagodek what do you think of |
The PR description is taken from the manual I created. The first section of the manual is LLM-generated, as the Dependency Cruiser website lacked a satisfactory general description. The remaining sections were either written by me or sourced from Dependency Cruiser instructions and examples. I also used an LLM to check for errors and improve readability. |
I was just curious - it looks like very good and quite complex description :) |
Personally I don't think the code reference should go to docs like in case of backend unless it'll be easy to implement then yes. Test coverage - yes, some meaningful analysis - yes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove autogenerated files !
I had to run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK to me but I leave final review to @jagodek
Dependency Cruiser Manual
Dependency Cruiser is a powerful tool for analyzing and visualizing dependencies in source code. It is designed primarily for JavaScript and TypeScript projects. This tool helps identify and understand the structure of dependencies between modules in your project, making it easier to:
Additionally, Dependency Cruiser allows you to:
Usage Commands
Dependency Cruiser provides the following commands for quick usage:
npm run depcruise:high
: Generates a high-level dependency diagram.npm run depcruise:low
: Generates a low-level dependency diagram.Outputs
Both commands generate the following outputs:
Optional VSCode Setup
If you are using VSCode, consider installing the SVG Preview plugin. This plugin allows you to:
Configuration
To modify Dependency Cruiser’s behavior, edit the configuration file located in the
dependency-cruiser
folder. The configuration file is a JavaScript file that defines the rules and settings for your project.Sample Configuration File
A detailed description of all available options can be found in the
.dependency-cruiser.js
sample configuration file, which can be generated by the tool. This file provides a comprehensive overview of the customization options available.Key Configuration Variables
Here are some of the most important configuration variables you can use:
Inclusion and Exclusion
includeOnly
: Specify which modules to include. This is an array of regular expressions (in string format). Dependency Cruiser will skip everything not matching this pattern.exclude
: Specify which modules to exclude. This is an array of regular expressions (in string format) to match against paths.doNotFollow
: Define modules to ignore during further analysis. This is an array of regular expressions (in string format) to match against paths.Graphical Representation
collapsePattern
: Pattern of modules to consolidate in high-level dependency graphs. If you use the high-level graphical dependency graph reporter (archi
), tweaking this pattern can optimize the visualization.Graph Layout
splines
: Controls the style of graph edges. For example:"ortho"
: Produces straight lines but can be slow for large graphs.rankdir
: Sets the graph's direction. Common values:"TB"
: Top-to-bottom (default)."LR"
: Left-to-right.ranksep
: Adjusts the separation between graph ranks for better clarity.nodesep
: Adjusts the separation between nodes for better clarity.Further Development
The current configuration files used by the commands are very simplified. In the future, they should be replaced with an edited default configuration that is generated by Dependency Cruiser. This enhanced configuration will provide a more comprehensive setup, enabling better analysis and compliance with architectural standards.
Keep up with the latest best practices and advanced configurations by regularly consulting Dependency Cruiser’s documentation and engaging with its user community.