Skip to content

Display plugin commands alphabetically under help - #3825

Merged
pmuens merged 10 commits into
serverless:masterfrom
darkowlzz:3784-help-plugin-sort
Jun 26, 2017
Merged

pmuens merged 10 commits into
serverless:masterfrom
darkowlzz:3784-help-plugin-sort

Conversation

@darkowlzz

@darkowlzz darkowlzz commented Jun 21, 2017 •

Copy link
Copy Markdown
Contributor

What did you implement:

Closes #3784

How did you implement it:

This change adds a new option to help command, --verbose. sls help --verbose extracts the loaded commands and arranges them according to their plugin name and displays all the commands grouped under their plugin names.

Commit messages should be helpful enough to understand the incremental changes.

How can we verify it:

screen shot 2017-06-21 at 7 01 20 pm

Todos:

  • Write tests
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

@darkowlzz

Copy link
Copy Markdown
Contributor Author

As per #3784 comment, about adding displayName property, it has not been added to the plugins yet.

Should I edit all the plugins and add displayName in them? Also, how do we decide the display names?

@pmuens
pmuens self-requested a review June 21, 2017 15:13
@pmuens

pmuens commented Jun 21, 2017 •

Copy link
Copy Markdown
Contributor

Super nice! Thanks for the PR @darkowlzz 🎉

That looks fantastic! 💯

Should I edit all the plugins and add displayName in them? Also, how do we decide the display names?

I would say that we could leave that out for now. Maybe we can add this later on.

@pmuens pmuens left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for the PR @darkowlzz! That looks really good 👍

I just looked through the code (haven't tested it yet) and saw that this list is only shown when someone runs serverless help --plugins. Could we update it so that it replaces the current list when running serverless help (so the generateMainHelp())?

AFAIK that's what @brianneisler proposed in #3784

Edit: Just looked into #3784 again (see comment below).

@pmuens

pmuens commented Jun 22, 2017

Copy link
Copy Markdown
Contributor

@darkowlzz I just read through the issue again. I'll sync with @brianneisler to see what he's exactly after (ordering by default vs. having this as an option).

I'll get back here once I know more. 👍

@pmuens pmuens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @darkowlzz thank you very much for this PR!

I talked to @brianneisler recently and we came to the conclusion that we should rename the option from --plugins to --verbose.

I updated the PR accordingly and added the requested command sorting.

I tested it thoroughly and it's GTM from my side. Will merge it once the build passes :shipit:

Thank you very much for working on this! 👍

@pmuens pmuens added this to the 1.17 milestone Jun 26, 2017
@pmuens
pmuens merged commit a76ae91 into serverless:master Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants