Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to filter js.map files generated from ts files #4642

Closed
dbaeumer opened this issue Mar 24, 2016 · 10 comments
Closed

Add support to filter js.map files generated from ts files #4642

dbaeumer opened this issue Mar 24, 2016 · 10 comments
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues
Milestone

Comments

@dbaeumer
Copy link
Member

  • VSCode Version: 0.10.12
  • OS Version: Windows

Steps to Reproduce:

  1. Compile TS -> JS including source maps
  2. Try to filter the js.map file if a corresponding TS file exists

Wasn't able to do so. Tried:

"**/*.js.map": { "when": "$basename($(basename)).ts"}
@bpasero bpasero added feature-request Request for new features or functionality file-explorer Explorer widget issues labels Mar 24, 2016
@bpasero bpasero added this to the Backlog milestone Mar 24, 2016
@bpasero
Copy link
Member

bpasero commented Mar 24, 2016

@dbaeumer this is currently not supported but I find the notation of 2-times $(basename) interesting. As a workaround for now I suggest you just use **/*.js.map: true

@bpasero
Copy link
Member

bpasero commented Mar 24, 2016

@dbaeumer the alternative idea i had was to introduce something like $(filename) that is really the portion of a file without extension.

@bpasero bpasero modified the milestones: Backlog, April 2016 Mar 30, 2016
@bpasero
Copy link
Member

bpasero commented Mar 30, 2016

The easy workaround for anyone hitting this is to just exclude with */.js.map: true

@connelhooley
Copy link

Old post but If it's any help I use the following:

"**/*.js": {
    "when": "$(basename).ts"
},
"**/*.map": {
    "when": "$(basename)"
}

It hides map files if there's a matching JS file and hides JS files if there's a matching TS file, leaving you with just TS files. Thought it was a little neater hiding all map files

@CreepGin
Copy link

+1 on the $(filename).

I'd like to add that doing a general **/*.js.map: true is not the way to go because deleting the corresponding .ts file will not reveal the .js.map file. I believe this should be the reason why when is desired in the first place.

@bpasero bpasero removed their assignment Aug 17, 2016
@cnshenj
Copy link

cnshenj commented Nov 3, 2016

+1.

There is no way to exclude generated .min.css and .d.ts now.
An exclude rule without when is not a workaround because .d.ts files may come from typings or @types so they don't have a source file and should not be excluded.

@cnshenj
Copy link

cnshenj commented Nov 3, 2016

$(filename) may not be good enough. For example: my.test.ts is compiled to my.test.js and my.test.d.ts. Since $(filename) is the name without any extension, $(filename).ts becomes my.ts.

What we need is something like $(relativeBasename) that just strip the portion after *. $(relativeBasename) of my.test.js.map is my.test, when the rules is **/*.d.ts. If we change rule to **/*.map, then $(relativeBasename) becomes my.test.js.

@wclr
Copy link

wclr commented May 27, 2017

Any news on this? Need to be able to hide *.d.ts and *.map.js the same way as ".js" that lay near ".ts".

@wclr
Copy link

wclr commented Oct 24, 2017

Hey, ".d.ts" was fixed, but not ".js.map" kind of strange? 😃

@isidorn
Copy link
Contributor

isidorn commented Nov 17, 2017

I see there are some workarounds.
This feature request will not be considered in the next 6-12 months roadmap and as such will be closed to keep the number of issues we have to maintain actionable. Thanks for understanding and happy coding!

@isidorn isidorn closed this as completed Nov 17, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues
Projects
None yet
Development

No branches or pull requests

7 participants