Ignore all directories in node_modules except for...

When using npm my node_modules folder gets filled with all the dependancies and sub-dependancies of my project and when dealing with even small to moderate sized project this folder gets pretty large. When I do want to look for something specific it's no fun seeing all all those sub-dependancy folders. 

How would I have WebStorm ignore all folders except for a few specified folders like JQuery, Bootstrap, @angular, etc... in the project view?


Would you like to hide all these subfolders from the Project navigator? You can either add names of all folders you'd like to exclude to 'Ignore files and folders' list in Settings | Editor | File Types, or create a custom scope with these folders excluded in Settings | Appearance & Behavior | Scopes (https://www.jetbrains.com/help/webstorm/2016.2/configuring-scopes-and-file-colors.html#new) and choose this scope for your project toolwindow (https://www.jetbrains.com/help/webstorm/2016.2/project-tool-window.html#views)


Also, you can try excluding these folders from project by marking them excluded (Mark directory as/Excluded) and hide excluded folders by disabling 'Show excluded files' (https://www.jetbrains.com/help/webstorm/2016.2/project-tool-window.html#title_bar_context_menu). Excluded folders are not indexed and not shown in search results, etc


Please sign in to leave a comment.