-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathplugin-cli-dotnet.js
More file actions
30 lines (22 loc) · 1007 Bytes
/
plugin-cli-dotnet.js
File metadata and controls
30 lines (22 loc) · 1007 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
#!/usr/bin/env node
// -----------------------------------------------------------------------------------------
// #region Imports
// -----------------------------------------------------------------------------------------
const { program, CommandRunner, Js } = require("and-cli");
const dotnetVersion = require("./modules/dotnet-version");
// #endregion Imports
CommandRunner.run(async () => {
// -----------------------------------------------------------------------------------------
// #region Entrypoint
// -----------------------------------------------------------------------------------------
program
.usage("option(s)")
.description("This is my custom version of the dotnet command")
.option(dotnetVersion.getOptions().toString(), dotnetVersion.description())
.parse(process.argv);
const { sdkVersion } = program.opts();
if (Js.hasNoArguments() || sdkVersion) {
dotnetVersion.run();
}
// #endregion Entrypoint
});