mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-11 10:00:13 -06:00
Created Setting Compiler Options in MSBuild projects (markdown)
parent
0f6688d7c4
commit
023de25098
45
Setting-Compiler-Options-in-MSBuild-projects.md
Normal file
45
Setting-Compiler-Options-in-MSBuild-projects.md
Normal file
@ -0,0 +1,45 @@
|
||||
## Overview
|
||||
Compiler options can be specified using MSBuild properties within an MSBuild project.
|
||||
|
||||
## Example
|
||||
|
||||
```XML
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||
<TypeScriptRemoveComments>false</TypeScriptRemoveComments>
|
||||
<TypeScriptSourceMap>true</TypeScriptSourceMap>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||
<TypeScriptRemoveComments>true</TypeScriptRemoveComments>
|
||||
<TypeScriptSourceMap>false</TypeScriptSourceMap>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets')" />
|
||||
```
|
||||
|
||||
## Mappings
|
||||
|
||||
Compiler Option | MSBuild Property Name | Allowed Values
|
||||
------------------|-----------------------|-----------------
|
||||
--declaration | TypeScriptGeneratesDeclarations | boolean
|
||||
--module | TypeScriptModuleKind | AMD or CommonJs
|
||||
--target | TypeScriptTarget | ES3, ES5 or ES6
|
||||
--project | Not supported in VS |
|
||||
--watch | Not supported in VS |
|
||||
--charset | TypeScriptCharset |
|
||||
--diagnostics | Not supported in VS |
|
||||
--emitBOM | TypeScriptEmitBOM | boolean
|
||||
--listFiles | Not supported in VS |
|
||||
--locale | Automatically set to PreferredUILang value |
|
||||
--mapRoot | TypeScriptMapRoot | File path
|
||||
--noEmit | Not supported in VS |
|
||||
--noEmitOnError | TypeScriptNoEmitOnError | boolean
|
||||
--noImplicitAny | TypeScriptNoImplicitAny | boolean
|
||||
--noLib | TypeScriptNoLib | boolean
|
||||
--noResolve | TypeScriptNoResolve | boolean
|
||||
--out | TypeScriptOutFile | File path
|
||||
--outDir | TypeScriptOutDir | File path
|
||||
--preserveConstEnums | TypeScriptPreserveConstEnums | boolean
|
||||
--removeComments | TypeScriptRemoveComments | boolean
|
||||
--sourceMap | TypeScriptSourceMap | File path
|
||||
--sourceRoot | TypeScriptSourceRoot | File path
|
||||
--suppressImplicitAnyIndexErrors | TypeScriptSuppressImplicitAnyIndexErrors | boolean
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user