Setup Overview
The plugin architecture is built on three main concepts that work together:
Core Concepts
- Element Descriptors - Define what types of elements exist in your project (components, modules, helpers, etc.) and how to recognize them based on file paths. Read more in the Elements section.
- Element Descriptions - Based on the descriptors, the plugin assigns a description to each file and dependency in your project with properties such as
type,name,category,origin,path, etc. - Element Selectors - Match specific elements in rules based on their description. Read more in the Selectors section.
- Global Settings - Configure plugin behavior, define dependencies to analyze, and set include/ignore patterns. Read more in the Global Settings section and Configuration Helpers.
Workflow
The typical workflow when setting up the plugin involves three main steps:
- Define your elements using element descriptors in
boundaries/elementssetting - Configure rules using element selectors to specify which elements can interact with each other
- Customize global settings to include/ignore files, define dependency nodes, etc. You can use the helpers in the Configuration Helpers section to simplify this process.
The plugin analyzes each file in your project and assigns it to an element based on your descriptors. Then, when checking dependencies (imports, requires, etc.), it uses your rules with element selectors to determine if the dependency is allowed.
Debug Mode
Enable debug mode when first configuring the plugin to see which element is assigned to each file and what values are assigned to the element descriptions.