简体   繁体   English

在具有.ts时隐藏.js文件

[英]Hiding .js files when having .ts

I just downaloade TypeScript for Visual Studio 2015. I am writing .ts file and it created .js file in the same level in solution. 我只是为Visual Studio 2015下载TypeScript。我正在编写.ts文件,它在解决方案的同一级别创建了.js文件。 Does anyone know how to hide the .js file or have it 'inside' .ts so I could just expand .ts tree and see .js? 有谁知道如何隐藏.js文件或将其放置在.ts内部,以便我可以扩展.ts树并查看.js?

You can configure your project to create .js files in a specific folder. 您可以配置项目以在特定文件夹中创建.js文件。

In VS 2015, you can set the build directory from "Redirect Javascript output to directory" in the typescript build section of your project properties page. 在VS 2015中,可以在项目属性页的typescript构建部分中的“将Javascript输出重定向到目录”中设置构建目录。

在此处输入图片说明

If you use a tsconfig.json the project property pages will all be grayed out but you can specify the directory in the tsconfig.json file: 如果使用tsconfig.json,则项目属性页将全部变灰,但您可以在tsconfig.json文件中指定目录:

 "compilerOptions": {
        "outDir": "./built",

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM