UNPKG

1.22 kBJavaScriptView Raw
1#!/usr/bin/env node
2// Copyright (c) Microsoft Corporation. All rights reserved.
3// Licensed under the MIT license.
4Object.defineProperty(exports, "__esModule", { value: true });
5const commander = require("commander");
6const office_addin_cli_1 = require("office-addin-cli");
7const commands = require("./commands");
8commander.name("office-addin-manifest");
9commander.version(process.env.npm_package_version || "(version not available)");
10commander
11 .command("info <manifest-path>")
12 .action(commands.info);
13commander
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);
18commander
19 .command("validate <manifest-path>")
20 .action(commands.validate);
21// if the command is not known, display an error
22commander.on("command:*", function () {
23 office_addin_cli_1.logErrorMessage(`The command syntax is not valid.\n`);
24 process.exitCode = 1;
25 commander.help();
26});
27if (process.argv.length > 2) {
28 commander.parse(process.argv);
29}
30else {
31 commander.help();
32}
33//# sourceMappingURL=cli.js.map
\No newline at end of file