-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Use "commander" for cli argv handling #1195
Conversation
Could you show the output difference before and after? |
Before:
After:
|
Does the CLI still run on old Node? (It should print an explanation before exiting the process.) |
I tried it on a docker running The output was the same. |
Yep. The thinking is that with time, minimal version of |
Should we also add a quick check in travis? |
It would be nice. |
if [ `node --version | sed -e 's/^v//' -e 's/\..\+//g'` -lt 4 ] | ||
then | ||
cd $temp_app_path | ||
node "$root_path"/packages/create-react-app/index.js test-node-version && exit 1 || exit 0 |
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.
We should verify that it prints a nice message instead of failing with e.g. a parse error.
I'm a bit concerned the project is abandoned: tj/commander.js#568. |
Yarn uses it so should be fine. Thanks! |
* Use "commander" for cli argv handling * Handle different scripts version forms and exits without a name given * Revert comment about min supported node version * Check sooner for the minimal node version * Add travis test for node <4 * Parse stderr in node versions <4
* Use "commander" for cli argv handling * Handle different scripts version forms and exits without a name given * Revert comment about min supported node version * Check sooner for the minimal node version * Add travis test for node <4 * Parse stderr in node versions <4
commander
is more easily configurable than the previous tool, and gives some output out-of-the-box.Also I've bumped the comment on the minimal node version as per #575.