cli-ux icon indicating copy to clipboard operation
cli-ux copied to clipboard

Replace treeify with object-treeify

Open simlu opened this issue 6 years ago • 3 comments

I've just spend some time fighting with treeify and then decided to write my own version that is much more concise and efficient.

I'm just curious if you would be interested in replacing treeify with object-treeify. Functionality wise they should be identical and I'd be very happy to create a pull request.

I'm just trying to promote my npm packages a bit more, however I believe that this is an upgrade to code quality and efficiency.

Edit: If you're looking for a good reason to change - object-treeify sorts the output alphabetically, not reverse as treeify seems to do.

simlu avatar Mar 18 '19 03:03 simlu

Cool! I think it's important to be able to control sorting. Would you add optional sorting?

RasPhilCo avatar Mar 20 '19 21:03 RasPhilCo

@RasPhilCo Yes, that would be a very easy addition. I'll take a look later!

simlu avatar Mar 20 '19 22:03 simlu

@RasPhilCo Updated the library. I'm not sure how the sorting would work with console input. However I've created a pull request here for now: https://github.com/oclif/cli-ux/pull/91/files

simlu avatar Mar 21 '19 02:03 simlu