I'm trying to familiarize myself with the VS 2015 Typescript project, and the differences between all the build options. When I read questions/answers on SO, they are usually referring to command line options, and I don't always know how they translate to the Typescript Build options in the VS 2015 UI.
Is there a window somewhere (or extension?) that shows the actual command line that visual studio runs when you select the various project Typescript Build options?
答案 0 :(得分:1)
Visual Studio通过Microsoft.TypeScript.targets
编译TypeScript,它将选项文件的路径传递给tsc.exe,例如:
"C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.5\tsc.exe" @"C:\Users\Username\AppData\Local\Temp\tmp12bc368455ec43d08c6a17ac865eb778.rsp"
.rsp
档案的内容:
--sourcemap --target ES6 --noEmitOnError --locale en-US "C:\Users\Username\Documents\Visual Studio 2015\Projects\TypeScriptHTMLApp1\TypeScriptHTMLApp1\app.ts" ......
不幸的是,它是一个临时文件,因此很难从中获取选项。
您可以在文本编辑器中打开.csproj
文件,找到MSBuild选项并获取命令行等效项:
https://github.com/Microsoft/TypeScript/wiki/Setting-Compiler-Options-in-MSBuild-projects