1 | #!/usr/bin/env node
|
2 |
|
3 |
|
4 | Object.defineProperty(exports, "__esModule", { value: true });
|
5 | const commander = require("commander");
|
6 | const office_addin_cli_1 = require("office-addin-cli");
|
7 | const commands = require("./commands");
|
8 | commander.name("office-addin-manifest");
|
9 | commander.version(process.env.npm_package_version || "(version not available)");
|
10 | commander
|
11 | .command("info <manifest-path>")
|
12 | .action(commands.info);
|
13 | commander
|
14 | .command("modify <manifest-path>")
|
15 | .option("-g,--guid [guid]", "Change the guid. A random guid is used if one is not provided.")
|
16 | .option("-d, --displayName <name>", "Change the display name.")
|
17 | .action(commands.modify);
|
18 | commander
|
19 | .command("validate <manifest-path>")
|
20 | .action(commands.validate);
|
21 |
|
22 | commander.on("command:*", function () {
|
23 | office_addin_cli_1.logErrorMessage(`The command syntax is not valid.\n`);
|
24 | process.exitCode = 1;
|
25 | commander.help();
|
26 | });
|
27 | if (process.argv.length > 2) {
|
28 | commander.parse(process.argv);
|
29 | }
|
30 | else {
|
31 | commander.help();
|
32 | }
|
33 |
|
\ | No newline at end of file |