1

I have cordova-ionic project setup in Visual Studio.

Now I have ts and js files within a single folder. I would like to hide js files which has corresponding ts file in the folder.

How to achieve this?

Shyamal Parikh
  • 2,850
  • 3
  • 31
  • 72

2 Answers2

1

If you right click on each file and select "Exclude From Project" they will be hidden, as long as you don't have "Show All Files" selected in Solution Explorer.

Steve Kennedy
  • 5,193
  • 3
  • 24
  • 38
  • 1
    Ya, that can be done however, that is a lot of work! Don't you agree? – Shyamal Parikh Apr 16 '16 at 07:31
  • @ShyamalParikh that is also what I meant with my comment on your question. You should not include them by default, which is probably done by some extension like Web Essentials when you create a .ts file – devqon Apr 17 '16 at 12:23
  • @devqon When I create a ts file and save it, Visual Studio automatically generates a corresponding js file. Now I would like Visual Studio to suppress this js file automatically instead of excluding manually. – Shyamal Parikh Apr 17 '16 at 12:30
0

You can stop VS from generating the JS files altogether by adding <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked> in to the first <PropertyGroup> in your project (.csproj) file.

More information here : https://github.com/Microsoft/TypeScript/issues/2326

This is probably not what you are looking for but it will achieve the outcome of not having .js files visible.

benPearce
  • 36,402
  • 14
  • 63
  • 95