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

Switch from nomnom to yargs #356

Closed
johnnyman727 opened this issue Oct 1, 2015 · 9 comments
Closed

Switch from nomnom to yargs #356

johnnyman727 opened this issue Oct 1, 2015 · 9 comments

Comments

@johnnyman727
Copy link
Contributor

johnnyman727 commented Oct 1, 2015

We use nomnom to parse commands. It is apparently deprecated and no longer maintained. They suggest using commander in the README but lots of folks recommend yargs.

@rwaldron
Copy link
Contributor

rwaldron commented Oct 4, 2015

This seems like a lot of work :(

@johnnyman727
Copy link
Contributor Author

I don't think it would be too bad but bin/tessel-2.js would be completely overwritten. All other files shouldn't need to be modified.

@Frijol
Copy link
Member

Frijol commented Oct 6, 2015

suckkks. But probably an issue a lot of people are running into rn. We could make a really useful blog post about the conversion process once we do it

@Student007
Copy link
Member

👍
I like the ability to improve usability by commander.
For example it would be able to add valid values for options and help messages could be improved easier than nomnom provided. I think it is a good idea to add examples to the help msg.

I would suggest the re-design shouldn't be done like copy&paste but more like @Frijol did for nomnom. I think while discussion we could do a lot of improvements and hide grown complexity.

Lets call it a usability improvement within a blog post (after we did a first plan). That way interesting ideas will inspire people to put in their ideas. Maybe someone likes to take part and become a new contributor due to he/she got an idea how to do. Because this task is more a diligence work than a bad learning curve it could really be a matching easy contribution badge after discussion is done.

The only point I cannot measure up is existing tests are affected.

@LinusU
Copy link
Contributor

LinusU commented Oct 7, 2015

Have you guys evaluated sindresorhus/meow?

I know that sindresorhus uses promises as we do as well and he is very active. tj on the other hand has switched to using go and is not personally maintaining his modules.

I haven't looked at them to closely to suggest anything thought.

(edit: If I pinged sindresorhus or tj, sorry)

@Student007
Copy link
Member

I agree with @LinusU we should take a look on several other CLI solutions and have an eye on maintaining activities. I couldn't find any better than meow and commander.
There is one argument against commander I could find: tj/commander.js#438 talks about it isn't unit test friendly 😞
On the other hand it seams meow isn't used by comparing number of users so the fact there are no open issues doesn't mean it is better than commander.
so long my two cents ...

@sindresorhus
Copy link

You should check out yargs. It's pretty good and well maintained.

// @bcoe @nexdrew

@nexdrew
Copy link

nexdrew commented Oct 7, 2015

Yes, thanks for the plug @sindresorhus!

yargs is the official successor to optimist and attempts to combine the simplicity of minimist with an intuitive API for building help content and option validation that is similar to, but more powerful than, nomnom. yargs is also a fully synchronous library, which keeps things simple.

Please take a look at yargs and let us know if you find it helpful or insufficient in any way. Thanks!

@Student007 Student007 mentioned this issue Oct 25, 2015
35 tasks
@johnnyman727 johnnyman727 changed the title Switch from nomnom to commander Switch from nomnom to yargs Aug 9, 2016
@johnnyman727
Copy link
Contributor Author

Closing in favor of #722.

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

7 participants