Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp')
-rw-r--r--src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/dotnetcli.host.json4
-rw-r--r--src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/template.json16
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": [