mycroforge/MycroForge.CLI/Program.cs
2024-04-23 08:56:01 +02:00

32 lines
939 B
C#

// using System.CommandLine;
// using MycroForge.CLI;
// using MycroForge.CLI.Exceptions;
// using MycroForge.CLI.Extensions;
// using Microsoft.Extensions.DependencyInjection;
// using Microsoft.Extensions.Hosting;
//
// using var host = Host
// .CreateDefaultBuilder()
// .ConfigureServices((_, services) =>
// {
// services
// .AddServices(args)
// .AddCommands();
// })
// .Build();
//
// try
// {
// var ctx = host.Services.GetRequiredService<ProjectContext>();
// await ctx.LoadConfig();
// await host.Services.GetRequiredService<MycroForge.CLI.Commands.MycroForge>().InvokeAsync(args);
// await ctx.SaveConfig();
// }
// catch(Exception e)
// {
// Console.WriteLine(e.Message);
// }
using MycroForge.CLI.CodeGen;
var src = new EntityLinker(await File.ReadAllTextAsync("scripts/user.py")).Rewrite();
// Console.WriteLine(src);