diff --git a/template_feed/Microsoft.DotNet.Web.ItemTemplates/Templates.nuspec b/template_feed/Microsoft.DotNet.Web.ItemTemplates/Templates.nuspec new file mode 100644 index 00000000000..56b24e1ad5c --- /dev/null +++ b/template_feed/Microsoft.DotNet.Web.ItemTemplates/Templates.nuspec @@ -0,0 +1,18 @@ + + + + Microsoft.DotNet.Web.ItemTemplates + $version$ + Microsoft + Web File Templates for Microsoft Template Engine + en-US + https://github.com/dotnet/templating + https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm + + + + + + + + diff --git a/template_feed/Microsoft.DotNet.Web.ItemTemplates/build.csproj b/template_feed/Microsoft.DotNet.Web.ItemTemplates/build.csproj new file mode 100644 index 00000000000..b45c2bf4cb6 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Web.ItemTemplates/build.csproj @@ -0,0 +1,21 @@ + + + + netstandard1.0 + $(MSBuildThisFileDirectory)\Templates.nuspec + version=$(PackageVersion) + False + False + False + False + $(TemplatesFolder) + False + $(MSBuildThisFileDirectory)..\..\artifacts\scratch + + + + + + + + \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Web.ItemTemplates/content/RazorPage/.template.config/dotnetcli.host.json b/template_feed/Microsoft.DotNet.Web.ItemTemplates/content/RazorPage/.template.config/dotnetcli.host.json new file mode 100644 index 00000000000..2c63c085104 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Web.ItemTemplates/content/RazorPage/.template.config/dotnetcli.host.json @@ -0,0 +1,2 @@ +{ +} diff --git a/template_feed/Microsoft.DotNet.Web.ItemTemplates/content/RazorPage/.template.config/template.json b/template_feed/Microsoft.DotNet.Web.ItemTemplates/content/RazorPage/.template.config/template.json new file mode 100644 index 00000000000..e94174ecba4 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Web.ItemTemplates/content/RazorPage/.template.config/template.json @@ -0,0 +1,44 @@ +{ + "author": "Microsoft", + "classifications": ["Web", "ASP.NET"], + "name": "Razor Page", + "generatorVersions": "[1.0.0.0-*)", + "groupIdentity": "Microsoft.AspNetCore.Mvc.RazorPage", + "precedence": "100", + "identity": "Microsoft.AspNetCore.Mvc.RazorPage", + "shortName": "page", + "sourceName": "Index", + "primaryOutputs": [ + { "path": "Index.cshtml"}, + { + "path": "Index.cshtml.cs", + "condition": "(!no-pagemodel)" + } + ], + "defaultName": "Index", + "sources": [ + { + "modifiers": [ + { + "condition": "(no-pagemodel)", + "exclude": [ + "Index.cshtml.cs" + ] + } + ] + } + ], + "symbols": { + "namespace": { + "description": "namespace for the generated code", + "replaces": "MyApp.Namespace", + "type": "parameter" + }, + "no-pagemodel": { + "description": "create page without a PageModel", + "type": "parameter", + "datatype": "bool", + "defaultValue": "false" + } + } +} diff --git a/template_feed/Microsoft.DotNet.Web.ItemTemplates/content/RazorPage/Index.cshtml b/template_feed/Microsoft.DotNet.Web.ItemTemplates/content/RazorPage/Index.cshtml new file mode 100644 index 00000000000..3fa062c0156 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Web.ItemTemplates/content/RazorPage/Index.cshtml @@ -0,0 +1,6 @@ +@page +@*#if (!no-pagemodel)*@ +@model IndexModel +@*#endif*@ +@{ +} diff --git a/template_feed/Microsoft.DotNet.Web.ItemTemplates/content/RazorPage/Index.cshtml.cs b/template_feed/Microsoft.DotNet.Web.ItemTemplates/content/RazorPage/Index.cshtml.cs new file mode 100644 index 00000000000..44761afe84f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Web.ItemTemplates/content/RazorPage/Index.cshtml.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace MyApp.Namespace +{ + public class IndexModel : PageModel + { + public void OnGet() + { + } + } +} \ No newline at end of file diff --git a/template_feed/Template.proj b/template_feed/Template.proj index ea73bd9ded7..96c9bce7e6d 100644 --- a/template_feed/Template.proj +++ b/template_feed/Template.proj @@ -7,6 +7,7 @@ +