forked from FacilityApi/FacilityJavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFsdGenJavaScriptApp.cs
More file actions
40 lines (35 loc) · 973 Bytes
/
Copy pathFsdGenJavaScriptApp.cs
File metadata and controls
40 lines (35 loc) · 973 Bytes
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
using System.Collections.Generic;
using ArgsReading;
using Facility.CodeGen.Console;
using Facility.CodeGen.JavaScript;
using Facility.Definition.CodeGen;
namespace fsdgenjs
{
public sealed class FsdGenJavaScriptApp : CodeGeneratorApp
{
public static int Main(string[] args)
{
return new FsdGenJavaScriptApp().Run(args);
}
protected override IReadOnlyList<string> Description => new[]
{
"Generates a JavaScript client for a Facility Service Definition.",
};
protected override IReadOnlyList<string> ExtraUsage => new[]
{
" --module <name>",
" The module name used by the generated JavaScript.",
" --typescript",
" Generates TypeScript.",
};
protected override CodeGenerator CreateGenerator(ArgsReader args)
{
return new JavaScriptGenerator
{
ModuleName = args.ReadOption("module"),
TypeScript = args.ReadFlag("typescript"),
};
}
protected override bool SupportsSingleOutput => true;
}
}