This tool has been created to visualize the structure of a Sass codebase. It is consisted of two parts:
- Node.js script that reads entry file and generates a JSON file with all imported files along with their dependencies
index.html
file which imports JSON file and displays the structure of the codebase
- Make sure you have Node.js v20 installed
- Download file
visualizer.js
andindex.html
and place them in the same directory - Run
node visualizer.js [your_entry_point.scss]
in the terminal. eg.node visualizer.js src/styles/main.scss
- This will generate a JSON file in the same directory as
visualizer.js
namedtree.json
- Open
index.html
in your browser. Webpage will automatically load the JSON file and display the structure of your codebase using d3.js library