
Product
Introducing Custom Tabs for Org Alerts
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.
base-task-prompts
Advanced tools
Utils for using prompts to conditionally run tasks. Requires the base-task and base-questions plugins.
Utils for using prompts to conditionally run tasks. Requires the base-task and base-questions plugins.
Install with npm:
$ npm install base-task-prompts --save
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 = require('base-task-prompts');
var questions = require('base-questions');
var task = require('base-task');
var Base = require('base');
var app = new Base();
var ask = prompts(app);
app.use(questions());
app.use(task());
Conditionally call a function
To run this example, you will also need to use the base-npm plugin.
var npm = require('base-npm');
app.use(npm());
// calls the function if the user's answer is truthy
app.task('foo', ask.confirm('Would you like to install deps?', function(cb) {
app.npm.latest(cb);
}));
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 truthy
app.task('foo', ask.confirm('Would you like to install deps?', ['npm']));
// if the user answers "yest"
app.task('npm', function(cb) {
app.npm.latest(cb);
});
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Generate readme and API documentation with verb:
$ npm install verb && npm run docs
Or, if verb is installed globally:
$ verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Follow me on GitHub or Twitter for updates about base-task-prompts and my other libraries:
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v, on April 07, 2016.
FAQs
Utils for using prompts to conditionally run tasks. Requires the base-task and base-questions plugins.
We found that base-task-prompts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.