-
Notifications
You must be signed in to change notification settings - Fork 34
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
feat(bin): Improve output #42
Conversation
@@ -2,6 +2,10 @@ | |||
|
|||
'use strict' | |||
|
|||
var size = require('window-size') | |||
var availableWidth = size.width || /* istanbul ignore next */ 80 | |||
var ui = require('cliui')({width: availableWidth}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Available width for tabular display is calculated with respect to individual terminal (window) settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome!! responsive ui 👍
Oooohhh! I love it |
Ha! At least when "diffing" it's not (yet) sorted alphabetically. Will fix ... |
Improve output of rules by rendering them in a tabular structure, like ls on *nixes. Closes #9
Current coverage is
|
I think that's it for this PR ... the mentioned duplicate function should be refactored out when making changes to the overall output (according to #7). Could you guys make a final review and maybe merge, when you got time for it? |
@@ -71,21 +72,21 @@ function RuleFinder(specifiedFile) { | |||
|
|||
// get all the current rules instead of referring the extended files or documentation | |||
this.getCurrentRules = function getCurrentRules() { | |||
return currentRules | |||
return sortRules(currentRules) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have named sortRules
to getSortedRules
as its is not sorting in-place but returning the sorted list.
Other than the |
Improve output of rules by rendering them in a tabular structure, like ls on *nixes.
Closes #9