diff options
Diffstat (limited to 'src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp')
2 files changed, 20 insertions, 0 deletions
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/dotnetcli.host.json b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/dotnetcli.host.json index 709f1b9629..c658c087dd 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/dotnetcli.host.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/dotnetcli.host.json @@ -8,6 +8,10 @@ "skipRestore": { "longName": "no-restore", "shortName": "" + }, + "SupportPagesAndViews": { + "longName": "support-pages-and-views", + "shortName": "s" } } } diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/template.json index 47000e198f..405e29cca7 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/template.json @@ -20,6 +20,16 @@ }, "sourceName": "Company.RazorClassLibrary1", "preferNameDirectory": true, + "sources": [ + { + "modifiers": [{ + "condition": "(!SupportPagesAndViews)", + "exclude": [ + "Areas/**" + ] + }] + } + ], "symbols": { "Framework": { "type": "parameter", @@ -42,6 +52,12 @@ "datatype": "bool", "description": "If specified, skips the automatic restore of the project on create.", "defaultValue": "false" + }, + "SupportPagesAndViews": { + "type": "parameter", + "datatype": "bool", + "defaultValue": "true", + "description": "Whether to support adding traditional Razor pages and Views in addition to components to this library." } }, "primaryOutputs": [ |