@@ -18,9 +18,6 @@ public class ProjectNewCommand : BaseCommand<ProjectNewCommand>
18
18
[ CommandOption ( 'l' , Description = Strings . ProjectTemplates . CommandOptionSupportedLanguagesDescription , IsRequired = false ) ]
19
19
public string Language { get ; private set ; } = "C#" ;
20
20
21
- private const string StartKit = "startkit" ;
22
- private const string StartKitAll = "startkit-all" ;
23
-
24
21
public ProjectNewCommand ( ILoggerFactory loggerFactory )
25
22
: base ( loggerFactory )
26
23
{
@@ -101,25 +98,9 @@ private async Task GenerateProjectsAndSolutionsFromSelectedTemplates(string proj
101
98
AnsiConsole . MarkupLine ( $ "[green]{ Strings . ProjectTemplates . CreatingProject } [/]", selectedTemplate . Name ) ;
102
99
103
100
var outputPath = string . Empty ;
104
- if ( selectedTemplate . Name . Contains ( StartKit ) )
105
- {
106
- if ( ! selectedTemplate . Name . EndsWith ( StartKitAll ) )
107
- {
108
- var regexBracketText = new Regex ( @"\((.*?)\)" ) ;
109
- var match = regexBracketText . Match ( selectedTemplate . Name ) ;
110
- if ( match . Success )
111
- {
112
- outputPath = Path . Combine ( OutputPath ! , $ "{ OutputPath } .{ match . Groups [ 1 ] . Value } ") ;
113
- outputPathArgument = "--output " + outputPath ;
114
- }
115
- }
116
- }
117
- else
118
- {
119
- outputPath = Path . Combine ( OutputPath ! , $ "{ OutputPath } .{ selectedTemplate . ShortName } ") ;
120
- outputPathArgument = "--output " + outputPath ;
121
- generatedProjectName = $ "{ projectName } .{ selectedTemplate . ShortName } ";
122
- }
101
+ outputPath = Path . Combine ( OutputPath ! , $ "{ OutputPath } .{ selectedTemplate . ShortName } ") ;
102
+ outputPathArgument = "--output " + outputPath ;
103
+ generatedProjectName = $ "{ projectName } .{ selectedTemplate . ShortName } ";
123
104
124
105
_ = await AppTools . RunDotNetCommand ( "dotnet" , $ "new { selectedTemplate . ShortName } --name { generatedProjectName } { outputPathArgument } --language { Language } --force", CancellationToken ) ;
125
106
}
@@ -184,21 +165,8 @@ private async Task GenerateSolution(string projectName)
184
165
var longName = segments [ 0 ] . Trim ( ) ;
185
166
var shortName = segments [ 1 ] . Trim ( ) ;
186
167
var languages = segments [ 2 ] . Replace ( "[" , string . Empty ) . Replace ( "]" , string . Empty ) . Trim ( ) ;
187
- if ( longName . Contains ( StartKit ) )
188
- {
189
- if ( longName . EndsWith ( StartKitAll ) )
190
- {
191
- startKitGroup = new MeadowTemplate ( longName , shortName ) ;
192
- }
193
- else
194
- {
195
- startKitTemplates . Add ( new MeadowTemplate ( $ "{ longName } ({ languages } )", shortName ) ) ;
196
- }
197
- }
198
- else
199
- {
200
- templateNameList . Add ( new MeadowTemplate ( $ "{ longName } ({ languages } )", shortName ) ) ;
201
- }
168
+
169
+ templateNameList . Add ( new MeadowTemplate ( $ "{ longName } ({ languages } )", shortName ) ) ;
202
170
}
203
171
}
204
172
0 commit comments