Skip to content

Commit

Permalink
remove platform commands from the help screen
Browse files Browse the repository at this point in the history
  • Loading branch information
austencollins committed Jan 12, 2019
1 parent e94f3ba commit 70e94c9
Show file tree
Hide file tree
Showing 2 changed files with 1,702 additions and 1,734 deletions.
36 changes: 2 additions & 34 deletions lib/classes/CLI.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,21 +158,6 @@ class CLI {
}

generateMainHelp() {
let platformCommands;
let frameworkCommands;
if (this.loadedCommands) {
const commandKeys = Object.keys(this.loadedCommands);
const sortedCommandKeys = _.sortBy(commandKeys);
const partitionedCommandKeys = _.partition(sortedCommandKeys,
(key) => this.loadedCommands[key].platform);
platformCommands = _.fromPairs(
_.map(partitionedCommandKeys[0], key => [key, this.loadedCommands[key]])
);
frameworkCommands = _.fromPairs(
_.map(partitionedCommandKeys[1], key => [key, this.loadedCommands[key]])
);
}

this.consoleLog('');

this.consoleLog(chalk.yellow.underline('Commands'));
Expand All @@ -187,25 +172,8 @@ class CLI {
this.consoleLog(chalk.dim('* Documentation: https://serverless.com/framework/docs/'));

this.consoleLog('');
if (!_.isEmpty(frameworkCommands)) {
_.forEach(frameworkCommands, (details, command) => {
this.displayCommandUsage(details, command);
});
} else {
this.consoleLog('No commands found');
}

this.consoleLog('');

this.consoleLog(chalk.yellow.underline('Platform (Beta)'));
// eslint-disable-next-line max-len
this.consoleLog(chalk.dim('* The Serverless Platform is currently in experimental beta. Follow the docs below to get started.'));
this.consoleLog(chalk.dim('* Documentation: https://serverless.com/platform/docs/'));

this.consoleLog('');

if (!_.isEmpty(platformCommands)) {
_.forEach(platformCommands, (details, command) => {
if (!_.isEmpty(this.loadedCommands)) {
_.forEach(this.loadedCommands, (details, command) => {
this.displayCommandUsage(details, command);
});
} else {
Expand Down
Loading

0 comments on commit 70e94c9

Please sign in to comment.