Corey Ogburn
Corey Ogburn

Reputation: 24759

Visual Studio Code hide all js files unless in vendor folder?

I'm trying to put together the perfect workspace settings for my Typescript project. I have my .js and .js.map files all generated alongside my ts files but I don't want to display them in the file tree. I know I can use "files.exclude" in the workspace settings to define glob patterns to not show in the tree however I'm not sure how to do what I want exactly.

I want to hide **/*.js unless the js file has a parent folder called vendor because my typescript project has some non-ts libraries that I would like to see in my file tree.

How can I make this happen?

I've tried setting a rule like "**/vendor/*.js" to false but that seems to be just as good as not having that rule present in the file at all, it doesn't go out of it's way to include files matching that pattern.

Upvotes: 0

Views: 1233

Answers (1)

Benjamin Pasero
Benjamin Pasero

Reputation: 124134

Please see our documentation for hiding derived resources: https://code.visualstudio.com/docs/languages/typescript#_hiding-derived-javascript-files

Upvotes: 2

Related Questions