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

Prompt user if insufficient args #352

Closed
lukeed opened this issue Sep 4, 2017 · 0 comments
Closed

Prompt user if insufficient args #352

lukeed opened this issue Sep 4, 2017 · 0 comments

Comments

@lukeed
Copy link
Member

lukeed commented Sep 4, 2017

If not enough data has been passed to the preact create command, should we prompt the user for the data?

Currently, Yargs will exit and print help text along with ~Not enough non-option arguments: got 0, need at least 2.

If we were to prompt users for missing data, we'd also print an info message along these lines:

warn('Insufficient command arguments! Prompting...');
info('Alternatively, run `preact create --help` for usage info.');

What should we do?



PS: If we do want to prompt, I have this completed in a local branch.


Extracted from #329 for clarity.

@lukeed lukeed added this to the 2.0 milestone Sep 4, 2017
@lukeed lukeed self-assigned this Sep 4, 2017
@reznord reznord closed this as completed in 280bcb3 Sep 6, 2017
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

1 participant