Utils for using prompts to conditionally run tasks. Requires the base-task and base-questions plugins.
Install
Install with npm:
$ npm install base-task-prompts --save
Usage
Heads up! This is not a plugin, but the main export is a function that takes an instance of base
as its only argument.
var prompts = ;var questions = ;var task = ;var Base = ;var app = ; var ask = ;app;app;
Examples
Conditionally call a function
To run this example, you will also need to use the base-npm plugin.
var npm = ;app; // calls the function if the user's answer is truthyapp;
Conditionally run tasks
To run this example, you will also need to use the base-npm plugin.
// runs the specified task if the user's answer is truthyapp; // if the user answers "yest"app;
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Building docs
Generate readme and API documentation with verb:
$ npm install verb && npm run docs
Or, if verb is installed globally:
$ verb
Running tests
Install dev dependencies:
$ npm install -d && npm test
Author
Jon Schlinkert
Follow me on GitHub or Twitter for updates about base-task-prompts and my other libraries:
License
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v, on April 07, 2016.