Currently in Beta
Simple dependency visualization for Feature Sliced Design based on dependency-cruiser
requirements: dependency-cruiser requires the
graphvizlibrary, you can install it usingbrew
limitations: Currently, it only operates with the provided
tsconfig.jsonandsrcfolder paths, which are assumed by default to be in the root directory.
npx fsd-cruisenpm i fsd-cruise -D
# Node usage variant
node node_modules/fsd-cruise/bin.js
# NPM scripts usage variant
# add to package.json scripts -> "generate:fsd-cruise": "node node_modules/fsd-cruise/bin.js"You can provide custom paths to your src folder and tsconfig.json. By default, only a high-level fsd-high-level-dependencies.html file is generated (collapsed to a folder depth of 3).
npx fsd-cruise app/src app/tsconfig.jsonIf you want an additional interactive canvas showing detailed file-level relationships within your architecture, you can use the --detailed flag (takes significantly more time). You can also specify the --depth (default 4) to dictate how deep the folders in the detailed graph should be collapsed:
# Generate the high-level graph AND the detailed graph with the default depth of 4
npx fsd-cruise --detailed
# Generate the detailed graph and specify the collapse depth explicitly
npx fsd-cruise --detailed --depth 5