Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add new module system in Visual Studio plugin #4532

Closed
fabioparra opened this issue Aug 28, 2015 · 4 comments
Closed

How to add new module system in Visual Studio plugin #4532

fabioparra opened this issue Aug 28, 2015 · 4 comments
Labels
API Relates to the public API for TypeScript Question An issue which isn't directly actionable in code

Comments

@fabioparra
Copy link

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?

@mhegazy
Copy link
Contributor

mhegazy commented Aug 28, 2015

There is no way at the moment. these values are hard-coded in the Visual Studio plugin.

@mhegazy mhegazy added Question An issue which isn't directly actionable in code API Relates to the public API for TypeScript labels Aug 28, 2015
@mhegazy mhegazy closed this as completed Aug 28, 2015
@mhegazy
Copy link
Contributor

mhegazy commented Aug 28, 2015

Related to #2656

@DickvdBrink
Copy link
Contributor

@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)

@fabioparra
Copy link
Author

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.

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API Relates to the public API for TypeScript Question An issue which isn't directly actionable in code
Projects
None yet
Development

No branches or pull requests

3 participants