Skip to content

Commit e25e955

Browse files
committed
Update templates
1 parent 0dcdfaf commit e25e955

File tree

4 files changed

+29
-37
lines changed

4 files changed

+29
-37
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,17 @@ Usefull commands
2222
# Get the list of tool
2323
dotnet tool list
2424

25+
# Get the list of templates
26+
dotnet new list
27+
2528
# Install from nuget
2629
dotnet tool install -g genocs.cli
2730

2831
# Update the tool
2932
dotnet tool update -g genocs.cli
3033

3134
# Uninstall cache
32-
dotnet tool uninstall genocs.cli -g
35+
dotnet tool uninstall -g genocs.cli
3336
```
3437

3538

@@ -42,15 +45,12 @@ dotnet build ./src/genocs.cli.csproj
4245
dotnet pack
4346

4447
# Run the tool to install the templates
45-
dotnet run -f net7.0 --project ./src/genocs.cli.csproj genocs i
48+
dotnet run -f net7.0 --project ./src/genocs.cli.csproj genocs -i
4649

4750
# Run the tool to install the templates (some as above with cd command)
4851
cd ./src
4952
dotnet run -f net7.0 genocs -i
5053

51-
# Pack the tool (to be deployed on nuget)
52-
dotnet pack
53-
5454
# Install the tool from local folder to the global cache
5555
dotnet tool install --global --add-source ./src/nupkg genocs.cli
5656
```

src/Program.cs

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@
1515

1616
if (args.Length == 0)
1717
{
18-
Console.WriteLine("Insufficient params. Please refer to https://blog.genocs.com/dotnet-webapi-boilerplate/general/genocs-api-console");
18+
Console.WriteLine("Insufficient params.");
19+
Console.WriteLine("Use following syntax:\n");
20+
Console.WriteLine(" genocs [cleanarchitecture|microservice|blazor] [-n|--new] <CompanyName.ProjectName.ServiceName>");
21+
Console.WriteLine(" genocs [cleanarchitecture|microservice|blazor] [-n|--new] <ServiceName>");
22+
Console.WriteLine("\nPlease refer to https://genocs-blog.netlify.app/");
1923
return;
2024
}
2125

22-
2326
string firstArg = args[0].Trim().ToLower();
24-
if (firstArg == "install" || firstArg == "i" || firstArg == "update" || firstArg == "u")
27+
if (firstArg == "--install" || firstArg == "-i" || firstArg == "--update" || firstArg == "-u")
2528
{
2629
await InstallTemplates();
2730
return;
@@ -38,7 +41,7 @@
3841
string command = args[1].Trim().ToLower();
3942
// Convert to Capital case
4043
string projectName = args[2].Trim();
41-
if (command == "n" || command == "new")
44+
if (command == "-n" || command == "--new")
4245
{
4346
await BootstrapCleanArchitectureSolution(projectName);
4447
}
@@ -57,7 +60,7 @@
5760
string command = args[1].Trim().ToLower();
5861
// Convert to Capital case
5962
string projectName = args[2].Trim();
60-
if (command == "n" || command == "new")
63+
if (command == "-n" || command == "--new")
6164
{
6265
await BootstrapMicroserviceSolution(projectName);
6366
}
@@ -66,19 +69,19 @@
6669
}
6770

6871

69-
if (firstArg == "wasm")
72+
if (firstArg == "blazor")
7073
{
7174
if (args.Length != 3)
7275
{
73-
Console.WriteLine("Invalid command. Use something like: genocs wasm new <CompanyName.ProjectName>");
76+
Console.WriteLine("Invalid command. Use something like: genocs blazor new <CompanyName.ProjectName>");
7477
return;
7578
}
7679

7780
string command = args[1].Trim().ToLower();
7881
// Convert to Capital case
7982
// Convert to Capital case
8083
string projectName = args[2].Trim();
81-
if (command == "n" || command == "new")
84+
if (command == "-n" || command == "--new")
8285
{
8386
await BootstrapBlazorWasmSolution(projectName);
8487
}
@@ -167,7 +170,7 @@ async Task InstallTemplates()
167170
await cleanArchitectureProc.WaitForExitAsync();
168171
// --------------------------
169172

170-
Console.WriteLine("Installing genocs Microservice template...");
173+
Console.WriteLine("Installing Genocs Microservice template...");
171174
var microservicePsi = new ProcessStartInfo
172175
{
173176
FileName = "dotnet",
@@ -178,7 +181,7 @@ async Task InstallTemplates()
178181
await microserviceProc.WaitForExitAsync();
179182
// --------------------------
180183

181-
Console.WriteLine("Installing genocs blazor wasm template...");
184+
Console.WriteLine("Installing Genocs Blazor template...");
182185
var blazorWebAssemblyPsi = new ProcessStartInfo
183186
{
184187
FileName = "dotnet",
@@ -192,7 +195,7 @@ async Task InstallTemplates()
192195
WriteSuccessMessage("Installed the required templates.");
193196
Console.WriteLine("Get started by using : genocs <type> new <CompanyName.ProjectName>.");
194197
Console.WriteLine("NOTE: <type> can be [cleanarchitecture | microservice | blazor].");
195-
Console.WriteLine("Refer to documentation at https://majestic-wisp-d90424.netlify.app");
198+
Console.WriteLine("Refer to documentation at https://genocs-blog.netlify.app/");
196199
}
197200

198201
async Task BootstrapCleanArchitectureSolution(string projectName)
@@ -207,7 +210,7 @@ async Task BootstrapCleanArchitectureSolution(string projectName)
207210
await proc.WaitForExitAsync();
208211
WriteSuccessMessage($"Genocs Architecture solution {projectName} successfully created.");
209212
WriteSuccessMessage("Application ready! Build something amazing!");
210-
Console.WriteLine("Refer to documentation at https://blog.genocs.com/dotnet-webapi-boilerplate/general/getting-started");
213+
Console.WriteLine("Refer to documentation at https://genocs-blog.netlify.app/");
211214
}
212215

213216
async Task BootstrapMicroserviceSolution(string projectName)
@@ -222,7 +225,7 @@ async Task BootstrapMicroserviceSolution(string projectName)
222225
await proc.WaitForExitAsync();
223226
WriteSuccessMessage($"Genocs Microservice solution {projectName} successfully created.");
224227
WriteSuccessMessage("Application ready! Build something amazing!");
225-
Console.WriteLine("Refer to documentation at https://blog.genocs.com/dotnet-webapi-boilerplate/general/getting-started");
228+
Console.WriteLine("Refer to documentation at https://genocs-blog.netlify.app/");
226229
}
227230

228231
async Task BootstrapBlazorWasmSolution(string projectName)
@@ -236,9 +239,9 @@ async Task BootstrapBlazorWasmSolution(string projectName)
236239

237240
using var proc = Process.Start(psi)!;
238241
await proc.WaitForExitAsync();
239-
WriteSuccessMessage($"Genocs blazor wasm solution {projectName} successfully created.");
242+
WriteSuccessMessage($"Genocs blazor solution {projectName} successfully created.");
240243
WriteSuccessMessage("Application ready! Build something amazing!");
241-
Console.WriteLine("Refer to documentation at https://blog.genocs.com/blazor-webassembly-boilerplate/general/getting-started/");
244+
Console.WriteLine("Refer to documentation at https://genocs-blog.netlify.app/");
242245
}
243246

244247
static void WriteSuccessMessage(string message)

src/README.md

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
# .NET Core library
1+
# Genocs Library Cli
22

3-
This package contains a set of base functionalities designed by Genocs.
4-
The library is built to be used on .NET standard 2.1 and NET6 or NET7 as well.
3+
The genocs cli to use for Genocs Templates
54

65
## Description
76

8-
Core NuGet package contains general purpose functionalities to be used on DDD services.
7+
TBW
98

109

1110
## Support
@@ -15,15 +14,5 @@ Please check the GitHub repository getting more info.
1514

1615
## Release notes
1716

18-
### [2023-03-12] 5.0.0
19-
- New Architecture
20-
21-
### [2023-03-12] 3.1.0
22-
- Added Builders
23-
24-
### [2023-03-12] 3.0.0
25-
- Refactory to implement CQRS pattern
26-
27-
28-
### [2023-03-04] 2.4.1
29-
- Updated System.Text.Json
17+
### [2023-03-12] 0.0.1
18+
- First release

src/genocs.cli.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<PackageId>Genocs.CLI</PackageId>
1313
<Title>Genocs CLI Tool</Title>
1414
<Authors>Nocco Giovanni Emanuele</Authors>
15-
<Description>Genocs CLI tool for creating and using Genocs Boilerplate Projects.</Description>
15+
<Description>Genocs CLI tool for creating and using Genocs Templates.</Description>
1616
<PackageTags>dotnet-new;templates</PackageTags>
1717
<RepositoryUrl>https://github.com/Genocs/genocs-library-cli</RepositoryUrl>
1818
<PackageProjectUrl>https://blog.genocs.com/</PackageProjectUrl>

0 commit comments

Comments
 (0)