diff options
author | Jose Miguel Torres <jostor@microsoft.com> | 2019-03-04 18:21:26 +0300 |
---|---|---|
committer | monojenkins <jo.shields+jenkins@xamarin.com> | 2019-03-05 11:57:27 +0300 |
commit | 6b0298cef45b8aa2ddb34b031cc589fea7c8f312 (patch) | |
tree | e2298c89a3036ce4e26e7a6c2c43364b3333b09d /main/src/addins/AspNet | |
parent | bebd65a16a7593a0610b0448888b73e5081d8769 (diff) |
[AspNet] Sets default BuildAction to TypeScriptCompile
- Adds default BuildAction for TypeScripts file templates
- Sets default BuildAction for both Classic and ASP.NET Core on .ts files to TypeScriptCompile like Windows
Diffstat (limited to 'main/src/addins/AspNet')
-rw-r--r-- | main/src/addins/AspNet/Projects/AspNetAppProjectFlavor.cs | 5 | ||||
-rw-r--r-- | main/src/addins/AspNet/Projects/WebSubtype.cs | 3 | ||||
-rw-r--r-- | main/src/addins/AspNet/Templates/EmptyTypeScriptFile.xft.xml | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/main/src/addins/AspNet/Projects/AspNetAppProjectFlavor.cs b/main/src/addins/AspNet/Projects/AspNetAppProjectFlavor.cs index 852c7dee79..b2af7b179f 100644 --- a/main/src/addins/AspNet/Projects/AspNetAppProjectFlavor.cs +++ b/main/src/addins/AspNet/Projects/AspNetAppProjectFlavor.cs @@ -303,6 +303,8 @@ namespace MonoDevelop.AspNet.Projects return WebSubtype.Stylus; case "CSHTML": return WebSubtype.Razor; + case "TS": + return WebSubtype.TypeScript; default: return WebSubtype.None; } @@ -546,11 +548,12 @@ namespace MonoDevelop.AspNet.Projects protected override string OnGetDefaultBuildAction (string fileName) { - WebSubtype type = DetermineWebSubtype (fileName); switch (type) { case WebSubtype.Code: return BuildAction.Compile; + case WebSubtype.TypeScript: + return BuildAction.TypeScriptCompile; case WebSubtype.None: return base.OnGetDefaultBuildAction (fileName); default: diff --git a/main/src/addins/AspNet/Projects/WebSubtype.cs b/main/src/addins/AspNet/Projects/WebSubtype.cs index 24bd85dbb4..e149d65d28 100644 --- a/main/src/addins/AspNet/Projects/WebSubtype.cs +++ b/main/src/addins/AspNet/Projects/WebSubtype.cs @@ -53,7 +53,8 @@ namespace MonoDevelop.AspNet.Projects Svg, Sass, Stylus,
- Razor + Razor, + TypeScript } } diff --git a/main/src/addins/AspNet/Templates/EmptyTypeScriptFile.xft.xml b/main/src/addins/AspNet/Templates/EmptyTypeScriptFile.xft.xml index ba60eb2595..30a6a4a012 100644 --- a/main/src/addins/AspNet/Templates/EmptyTypeScriptFile.xft.xml +++ b/main/src/addins/AspNet/Templates/EmptyTypeScriptFile.xft.xml @@ -14,6 +14,6 @@ </TemplateConfiguration> <TemplateFiles> - <File DefaultExtension=".ts" src="TypeScriptFileTemplate.ts" /> + <File DefaultExtension=".ts" src="TypeScriptFileTemplate.ts" BuildAction="TypeScriptCompile" /> </TemplateFiles> </Template> |