-
Notifications
You must be signed in to change notification settings - Fork 12
/
template.json
168 lines (165 loc) · 4.59 KB
/
template.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
{
"$schema": "http://json.schemastore.org/template",
"author": "Jamie Nordmeyer",
"classifications": ["Web", "ASP.NET", "API"],
"identity": "StaticSphere.CleanArchitecture.Api",
"name": "Clean Architecture Solution",
"tags": {
"language": "C#",
"type": "solution"
},
"shortName": "clean-arch",
"sourceName": "CleanArchTemplate",
"preferNameDirectory": true,
"symbols": {
"includeTests": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "true",
"description": "Determines if the test projects should be included or not"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
},
"includeEF": {
"type": "parameter",
"datatype": "choice",
"choices": [
{
"choice": "postgres",
"description": "Adds Postgres Entity Framework congiguration"
},
{
"choice": "sqlserver",
"description": "Adds SQL Server Entity Framework configuration"
}
]
},
"includePostgres": {
"type": "computed",
"value": "(includeEF == \"postgres\")"
},
"includeSqlServer": {
"type": "computed",
"value": "(includeEF == \"sqlserver\")"
},
"includeDB": {
"type": "computed",
"value": "(includePostgres || includeSqlServer)"
},
"useStartup": {
"type": "parameter",
"datatype": "bool",
"description": "Determines if the API project should use Startup.cs instead of the newer Minimal API style Program.cs file",
"defaultValue": "false"
},
"dbContextName": {
"type": "parameter",
"datatype": "text",
"description": "If specified, sets the name of the EF DbContext when using EF. You MUST specify the `DbContext` suffix in this name if you want it in the class name generated.",
"replaces": "ApplicationDbContext",
"fileRename": "ApplicationDbContext"
}
},
"sources": [
{
"exclude": [
"**/[Bb]in/**",
"**/[Oo]bj/**",
".template.config/**/*",
"**/*.filelist",
"**/*.user",
"**/*.lock.json",
".vscode/**/*",
"nuget.csproj"
],
"modifiers": [
{
"condition": "(!includeTests)",
"exclude": [
"tests/CleanArchTemplate.Application.Tests/**/*",
"tests/CleanArchTemplate.Infrastructure.Tests/**/*",
"tests/CleanArchTemplate.Api.Tests/**/*"
]
},
{
"condition": "(!includeDB)",
"exclude": [
"src/CleanArchTemplate.Application/Interfaces/Persistence/IApplicationDbContext.cs",
"src/CleanArchTemplate.Infrastructure/Persistence/Configuration/**/*",
"src/CleanArchTemplate.Infrastructure/Persistence/ApplicationDbContext.cs",
"src/CleanArchTemplate.Infrastructure/Persistence/SeedData.cs"
]
},
{
"condition": "(!useStartup)",
"exclude": ["src/CleanArchTemplate.Api/Startup.cs"]
}
]
}
],
"primaryOutputs": [
{
"path": "CleanArchTemplate.sln"
}
],
"postActions": [
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [{ "text": "Run 'dotnet restore'" }],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
}
],
"SpecialCustomOperations": {
"**/*.csproj": {
"operations": [
{
"type": "conditional",
"configuration": {
"if": ["<!-- #if"],
"else": ["<!-- #else"],
"elseif": ["<!-- #elseif", "<!-- #elif"],
"endif": ["<!-- #endif"],
"trim": "true",
"wholeLine": "true"
}
}
]
},
"**/*.sln": {
"operations": [
{
"type": "conditional",
"configuration": {
"if": ["---#if"],
"else": ["---#else"],
"elseif": ["---#elseif", "---#elif"],
"endif": ["---#endif"],
"trim": "true",
"wholeLine": "true"
}
}
]
},
"**/*.md": {
"operations": [
{
"type": "conditional",
"configuration": {
"if": ["---#if"],
"else": ["---#else"],
"elseif": ["---#elseif", "---#elif"],
"endif": ["---#endif"],
"trim": "true",
"wholeLine": "true"
}
}
]
}
}
}