Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make optionList width configurable #13

Closed
75lb opened this issue Sep 11, 2017 · 2 comments
Closed

make optionList width configurable #13

75lb opened this issue Sep 11, 2017 · 2 comments

Comments

@75lb
Copy link
Owner

75lb commented Sep 11, 2017

Currently, the width of a content section is configurable. Here's an example of a content section with a maxWidth of 40:

const usage = commandLineUsage([
  {
    header: 'A typical app',
    content: {
      options: { maxWidth: 40 },
      data: [
        { col: 'Generates something [italic]{very} important. This is a rather long, but ultimately inconsequential description intended solely to demonstrate description appearance. ' }
      ]
    }
  }
])

Output:

A typical app

  Generates something very important.
  This is a rather long, but ultimately
  inconsequential description intended
  solely to demonstrate description
  appearance.

However, an optionList section currently has a fixed width of 80 columns which is an issue for some users.

Resolve this issue by making the maxWidth of an optionList section configurable, the same way as it is for a content section.

@AriLFrankel
Copy link
Contributor

AriLFrankel commented Feb 14, 2018

I'd be happy to work on this if you're still looking for a hand :)

EDIT: I opened a PR that I think resolves this. Let me know if you get a chance to take a look :)

@75lb
Copy link
Owner Author

75lb commented Mar 9, 2018

Fixed and released in v5.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants