Skip to content

Prompt user if insufficient args #352

@lukeed

Description

@lukeed

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions