Excluding node_modules when using tree command on Mac
The node_modules folder is often super big and contains countless files and subdirectories. Therefore, when using the tree command to display your project structure, you should ignore node_modules. To do so, try this:
tree -I 'node_modules'
If you want the command to exclude more than one directory, you can use:
tree -I 'folder-1|folder-22|folder-3|folder-4'
Simple as that. Hope this short article can help you a little bit in some way.