What are the TypeScript project build configuration options?

后端 未结 3 1628
予麋鹿
予麋鹿 2020-12-18 14:27

When I create a new \"HTMLWeb App\" project, I get a .csproj with a few default options in the project XML for Typescript. Where can I find a list of all possible TypeScript

相关标签:
3条回答
  • The easiest way to change any Typescript build options is with Web Extensions. I'd highly recommend it if you do any kind of web work with Visual Studio.

    0 讨论(0)
  • 2020-12-18 15:27

    Update on Guptas's answer for Visual Studio 2015 RC. The Microsoft.TypeScript.targets file is now in c:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript.

    • TypeScriptRemoveComments ..... --removeComments
    • TypeScriptNoImplicitAny ..... --noImplicitAny
    • TypeScriptGeneratesDeclarations ..... --declaration
    • TypeScriptModuleKind ..... --module "$(TypeScriptModuleKind)"
    • TypeScriptOutFile ..... --out "$(TypeScriptOutFile)"
    • TypeScriptOutDir ..... --outDir "$(TypeScriptOutDir)"
    • TypeScriptSourceMap ..... --sourcemap
    • TypeScriptTarget ..... --target $(TypeScriptTarget)
    • TypeScriptNoResolve ..... --noResolve
    • TypeScriptAdditionalFlags ..... $(TypeScriptAdditionalFlags)
    • TypeScriptMapRoot ..... --mapRoot "$(TypeScriptMapRoot)"
    • TypeScriptSourceRoot ..... --sourceRoot "$(TypeScriptSourceRoot)"
    • TypeScriptCodePage ..... --codepage $(TypeScriptCodePage)
    • TypeScriptCharset ..... --charset $(TypeScriptCharset)
    • TypeScriptEmitBOM ..... --emitBOM
    • TypeScriptNoLib ..... --noLib
    • TypeScriptPreserveConstEnums ..... --preserveConstEnums
    • TypeScriptSuppressImplicitAnyIndexErrors ..... --suppressImplicitAnyIndexErrors
    0 讨论(0)
  • 2020-12-18 15:29

    I found the list of options in the .targets file that shipped with the TypeScript installation. Here is the full list of options with the command line argument that gets actually sent to "tsc.exe" (the TypeScript compiler)

    • TypeScriptIncludeComments ..... --comments
    • TypeScriptGeneratesDeclarations ..... --declaration
    • TypeScriptModuleKind ..... --module $(TypeScriptModuleKind)
    • TypeScriptIncludeDefaultLib ..... --nolib
    • TypeScriptOutFile ..... --out $(TypeScriptOutFile)
    • TypeScriptSourceMap ..... --sourcemap
    • TypeScriptTarget ..... --target $(TypeScriptTarget)
    • TypeScriptAdditionalFlags ..... $(TypeScriptAdditionalFlags)
    0 讨论(0)
提交回复
热议问题