简体   繁体   中英

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. Does anyone know how to hide the .js file or have it 'inside' .ts so I could just expand .ts tree and see .js?

You can configure your project to create .js files in a specific folder.

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.

在此处输入图片说明

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:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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