Eunice Renderer
DevSnicket Eunice is a toolkit based on the premise that unidirectional dependencies can be beneficial to structure and modularity in software. Eunice's approach isn't limited to direct dependencies, but includes indirect dependencies as well.
try out Eunice on Eunice 🐶🥫 (created with)
This package reads dependencies and structure, defined as YAML, and renders them as SVG. The structure can include stacks that are scoped/grouped into a hierarchy. Dependencies of each item are counted and totals are rendered with the item. Item's can have multiple totals, separated by whether the dependencies counted either match or do not match their stack.
Install using npm
:
npm install --save-dev @devsnicket/eunice-renderer
Or with yarn
:
yarn add --dev @devsnicket/eunice-renderer
Instead of rendering dependencies as lines between items each dependency is counted into the following categories:
- matches stack (green down arrow)
- does not match stack (red up arrow)
- is not independent (red horizontal arrow)
Dependency counts appear for both sides of the dependency, the dependent item and the item depended upon. When there are multiple counts a summary of all counts is rendered at the bottom.
scenario | svg | scenario | svg | scenario | svg |
---|
upper depends upon lower | | lower depends upon upper | | interdependent (stacked) | |
independent | | first depends upon second | | interdependent (not stacked) | |
Dependencies within an item are also summarized and rendered inside the item box, below the identifer text.
scenario | svg | scenario | svg | scenario | svg |
---|
parent depends upon item | | item depends upon parent | | first item depends upon second item (not stacked) | |
Items and sub-item can also be opened. Opening an item will show its contents and breadcrumb links for where it is in the hierarchy.
root > grandparent