UNPKG

998 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.HelpCommand = void 0;
4/**
5 * @license
6 * Copyright Google Inc. All Rights Reserved.
7 *
8 * Use of this source code is governed by an MIT-style license that can be
9 * found in the LICENSE file at https://angular.io/license
10 */
11const command_1 = require("../models/command");
12const color_1 = require("../utilities/color");
13class HelpCommand extends command_1.Command {
14 async run() {
15 this.logger.info(`Available Commands:`);
16 for (const cmd of Object.values(await command_1.Command.commandMap())) {
17 if (cmd.hidden) {
18 continue;
19 }
20 const aliasInfo = cmd.aliases.length > 0 ? ` (${cmd.aliases.join(', ')})` : '';
21 this.logger.info(` ${color_1.colors.cyan(cmd.name)}${aliasInfo} ${cmd.description}`);
22 }
23 this.logger.info(`\nFor more detailed help run "ng [command name] --help"`);
24 }
25}
26exports.HelpCommand = HelpCommand;