-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram.cs
More file actions
66 lines (55 loc) · 2.56 KB
/
Program.cs
File metadata and controls
66 lines (55 loc) · 2.56 KB
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
using Nexus.Commands;
using Spectre.Console;
using Spectre.Console.Cli;
using Color = Spectre.Console.Color;
namespace Nexus;
public class Program
{
public static void Main(string[] args)
{
AnsiConsole.Write(new FigletText("Nexus Framework").LeftJustified().Color(Color.Green));
CommandApp app = new ();
app.Configure(config =>
{
config.AddCommand<InitCommand>("init")
.WithDescription("Create a new Nexus Solution");
config.AddCommand<EjectCommand>("eject")
.WithDescription("Replace library references with source code");
config.AddBranch<AddSettings>("add", options =>
{
options.SetDescription("Add a new component");
options.AddCommand<AddServiceCommand>("service")
.WithDescription("Add a new service");
});
config.AddBranch<RunSetings>("run", options =>
{
options.SetDescription("Run the solution");
options.AddCommand<RunLocalCommand>("local")
.WithDescription("Run Local development environment");
options.AddCommand<RunDockerCommand>("docker")
.WithDescription("Run Docker development environment");
options.AddCommand<RunKubernetesCommand>("k8s")
.WithDescription("Run Kubernetes development environment");
});
config.AddBranch<CleanSettings>("clean", options =>
{
options.SetDescription("Clean up the solution");
options.AddCommand<CleanLocalCommand>("local")
.WithDescription("Clean up local development environment");
options.AddCommand<CleanDockerCommand>("docker")
.WithDescription("Clean up Docker development environment");
options.AddCommand<CleanKubernetesCommand>("k8s")
.WithDescription("Clean up Docker development environment");
});
config.AddBranch<DockerSettings>("docker", options =>
{
options.SetDescription("Build/Publish Docker images");
options.AddCommand<DockerBuildCommand>("build")
.WithDescription("Build docker images for services");
options.AddCommand<DockerPublishCommand>("publish")
.WithDescription("Publish docker images for services");
});
});
app.Run(args);
}
}