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

feat(interactive-mode): Support interactive as an option #6

Merged
merged 2 commits into from
Jan 15, 2018

Conversation

nanovazquez
Copy link
Owner

This PR enables the user to set the interactive mode by default in the tool.

Usage:

const options = {
  interactive: {
    default: true,
  },
  ...
};

yargsInteractive()
  .usage('$0 <command> [args]')
  .interactive(options)
  .then((result) => {
    // The tool will prompt questions and will output your answers.
    // TODO: Do something with the result (e.g result.name)
    console.log(result)
  });

Then in the console, simply run:

➜ node my-cli.js

And the tool will prompt by default.

@nanovazquez nanovazquez merged commit 41ef7b8 into master Jan 15, 2018
@nanovazquez nanovazquez deleted the feat/interactive-as-option branch January 15, 2018 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant