Custom Search - exclude all node_modules recusively

Answered

Hi

I would like to create a custom search in Find In Path , to exclude all node_modules recursively

I coudnt find an easy way , . The only way I can see , is going inside the project tree and excluding each node_module folder one by one.

This is a very hard way of doing it.

I would like a clever way of doing it . filter all folders called node_module recusively.

What pattern can I use.

Thanks.

6 comments
Comment actions Permalink

Mark directory as/Excluded in folder right-click menu excludes the folder recursively - all files/subfolders of excluded folder are excluded.

Note also that you can create a custom scope with node_modules folder excluded recursively (Settings/Preferences | Appearance & Behavior | Scopes) and use this scope when searching in Find In Path

0
Comment actions Permalink

Hi Elena

I know what you said , this doesnt help me.

My problem is that I have a very large tree with many folders and sub folders and each one contains a node_module folder. I do not want to go and exclude each node_module folder seperately. I would like to just set the pattern that it ignores all node_module folders recursively

0
Comment actions Permalink

can't you create the corresponding scope then? Like !file[your_project]:*node_modules//*

0
Comment actions Permalink

Hi Elena

This is exactly what I was looking for 

Thanks thats great.

0
Comment actions Permalink

Doesn't work.... never have I ever had a software that was such a pain to search. A million features, but the important ones, don't work. I wish they'd stop spending time on features that no one uses and just fix the basic functionality!

0
Comment actions Permalink

You must have faced the issue because node_modules are only partially excluded - direct dependencies listed in package.json are added to JavaScript libraries and thus included.

Use In Project scope for searching. JavaScript libraries are only included when using Directory scope with corresponding folder selected, or when using custom scope with explicit filters

0

Please sign in to leave a comment.