-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCompiler.cs
More file actions
37 lines (31 loc) · 1.01 KB
/
Compiler.cs
File metadata and controls
37 lines (31 loc) · 1.01 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
using System;
using System.IO;
namespace Compiler
{
class Program
{
static async Task Main(string[] args)
{
// Load the configuration from the JSON file.
var configManager = new ConfigurationManager();
Config config = configManager.LoadConfig();
Console.WriteLine($"[Version {config.Version}] by johnoclock");
if (config.Update)
{
await GithubUpdater.UpdateFromGithubAsync(config);
}
if (args.Length > 0)
{
ApiUpdater.UpdateApi(args[0], config);
DirectoryProcessor.ProcessDirectory(args[0], config); // Pass the config to the method.
}
else
{
ApiUpdater.UpdateApiAll(config);
DirectoryProcessor.ProcessCurrentDirectory(config); // Pass the config to the method.
}
Console.WriteLine("Press Enter to exit...");
Console.ReadLine();
}
}
}