How to add new module system in Visual Studio plugin
I did the fork and I've also changed typescript compiler, adding a new module system ModuleKind.ExtJS. Now I'm able to invoke tsc.js with argument "-m extjs".
My only problem now is to set argument "-m extjs" in the visual studio feature "compile on save" .
Visual studio seems to ignore this new enum that I settled in my project msbuild file.
There is any other way to add or change compiler arguments with the visual studio plugin?
There is no way at the moment. these values are hard-coded in the Visual Studio plugin.
Related to #2656
@fabioparra, you might want to do it like below. I know it is not the nicest thing to manually hack in csproj but it does work!
Change the csproj below the import line to the following (so you only need to add the property group not the import statement)
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets')" />
<PropertyGroup>
<TypeScriptBuildConfigurations>$(TypeScriptBuildConfigurations) --tmp</TypeScriptBuildConfigurations>
</PropertyGroup>
Output to prove that it works:
1> Task Parameter:TypeScriptCompileBlocked=False (TaskId:15)
1> C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.5\tsc.exe --sourcemap --target ES5 --noEmitOnError --locale en-US --tmp "C:\Users\dvdbrink\documents\visual studio 2015\Projects\TypeScriptHTMLApp1\TypeScriptHTMLApp1\app.ts" (TaskId:15)
1>VSTSC : error TS5023: Build: Unknown compiler option 'tmp'.
1> (TaskId:15)
1> The command exited with code 1. (TaskId:15)
Hi, thanks for your responses. @DickvdBrink, your sugention works only when building the project. When I save the file, vs editor plugin doesn't use TypeScriptBuildConfigurations tag.