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

feat(bin): Improve output #42

Merged
merged 3 commits into from
Apr 15, 2016
Merged

feat(bin): Improve output #42

merged 3 commits into from
Apr 15, 2016

Conversation

ta2edchimp
Copy link
Collaborator

Improve output of rules by rendering them in a tabular structure, like ls on *nixes.

Closes #9

@ta2edchimp
Copy link
Collaborator Author

Example Output:

image

@@ -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})
Copy link
Collaborator Author

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.

Copy link
Owner

Choose a reason for hiding this comment

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

awesome!! responsive ui 👍

@kentcdodds
Copy link
Collaborator

Oooohhh! I love it

@ta2edchimp
Copy link
Collaborator Author

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
@codecov-io
Copy link

Current coverage is 100.00%

Merging #42 into master will not affect coverage as of 82cc510

@@            master     #42   diff @@
======================================
  Files            4       5     +1
  Stmts           82     125    +43
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit             82     125    +43
  Partial          0       0       
  Missed           0       0       

Review entire Coverage Diff as of 82cc510

Powered by Codecov. Updated on successful CI builds.

@ta2edchimp
Copy link
Collaborator Author

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)
Copy link
Owner

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.

@sarbbottam
Copy link
Owner

Other than the function name I am sold out to this PR.

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.

4 participants